Category Archives: Tips

WordPress Default Error Codes (also good for other systems)
Date Created: July 13, 2017  Date Modified: July 13, 2017

WordPress error codes sit in functions.php, they are well worth learning–especially if you are not familiar with error codes.


100 => 'Continue',
101 => 'Switching Protocols',
102 => 'Processing',

200 => 'OK',
201 => 'Created',
202 => 'Accepted',
203 => 'Non-Authoritative Information',
204 => 'No Content',
205 => 'Reset Content',
206 => 'Partial Content',
207 => 'Multi-Status',
226 => 'IM Used',

300 => 'Multiple Choices',
301 => 'Moved Permanently',
302 => 'Found',
303 => 'See Other',
304 => 'Not Modified',
305 => 'Use Proxy',
306 => 'Reserved',
307 => 'Temporary Redirect',
308 => 'Permanent Redirect',

400 => 'Bad Request',
401 => 'Unauthorized',
402 => 'Payment Required',
403 => 'Forbidden',
404 => 'Not Found',
405 => 'Method Not Allowed',
406 => 'Not Acceptable',
407 => 'Proxy Authentication Required',
408 => 'Request Timeout',
409 => 'Conflict',
410 => 'Gone',
411 => 'Length Required',
412 => 'Precondition Failed',
413 => 'Request Entity Too Large',
414 => 'Request-URI Too Long',
415 => 'Unsupported Media Type',
416 => 'Requested Range Not Satisfiable',
417 => 'Expectation Failed',
418 => 'I\'m a teapot',
421 => 'Misdirected Request',
422 => 'Unprocessable Entity',
423 => 'Locked',
424 => 'Failed Dependency',
426 => 'Upgrade Required',
428 => 'Precondition Required',
429 => 'Too Many Requests',
431 => 'Request Header Fields Too Large',
451 => 'Unavailable For Legal Reasons',

500 => 'Internal Server Error',
501 => 'Not Implemented',
502 => 'Bad Gateway',
503 => 'Service Unavailable',
504 => 'Gateway Timeout',
505 => 'HTTP Version Not Supported',
506 => 'Variant Also Negotiates',
507 => 'Insufficient Storage',
510 => 'Not Extended',
511 => 'Network Authentication Required',

I hope this helps for when customizing WordPress.

LDAP Alfresco (global properties)
Date Created: December 8, 2015  Date Modified: January 17, 2016

I found this useful so I thought I’d post it

authentication.chain=alfrescoNtlm1:alfrescoNtlm,ldap1:ldap

# This flag enables use of this LDAP subsystem for authentication. It may be
# that this subsytem should only be used for synchronization, in which case
# this flag should be set to false.
ldap.authentication.active=true

#
# This properties file brings together the common options for LDAP authentication rather than editing the bean definitions
#
ldap.authentication.allowGuestLogin=true

# How to map the user id entered by the user to that passed through to LDAP
ldap.authentication.userNameFormat=uid=%s,ou=users,dc=armundia,dc=com

# The LDAP context factory to use
ldap.authentication.java.naming.factory.initial=com.sun.jndi.ldap.LdapCtxFactory

# The URL to connect to the LDAP server
ldap.authentication.java.naming.provider.url=ldap://ldap.....com:389

# The authentication mechanism to use for password validation
ldap.authentication.java.naming.security.authentication=simple

# Escape commas entered by the user at bind time
# Useful when using simple authentication and the CN is part of the DN and contains commas
ldap.authentication.escapeCommasInBind=false

# Escape commas entered by the user when setting the authenticated user
# Useful when using simple authentication and the CN is part of the DN and contains commas, and the escaped \, is
# pulled in as part of an LDAP sync

# If this option is set to true it will break the default home folder provider as space names can not contain \
ldap.authentication.escapeCommasInUid=false

# Comma separated list of user names who should be considered administrators by default
ldap.authentication.defaultAdministratorUserNames=....

# This flag enables use of this LDAP subsystem for user and group
# synchronization. It may be that this subsytem should only be used for
# authentication, in which case this flag should be set to false.
ldap.synchronization.active=true

# The authentication mechanism to use for synchronization
ldap.synchronization.java.naming.security.authentication=simple

# The default principal to use (only used for LDAP sync)
ldap.synchronization.java.naming.security.principal=cn\=ldap,dc\=armundia,dc\=com

# The password for the default principal (only used for LDAP sync)
ldap.synchronization.java.naming.security.credentials=.....

# If positive, this property indicates that RFC 2696 paged results should be
# used to split query results into batches of the specified size. This
# overcomes any size limits imposed by the LDAP server.
ldap.synchronization.queryBatchSize=0

# If positive, this property indicates that range retrieval should be used to fetch
# multi-valued attributes (such as member) in batches of the specified size.
# Overcomes any size limits imposed by Active Directory.
ldap.synchronization.attributeBatchSize=0

# The query to select all objects that represent the groups to import.
ldap.synchronization.groupQuery=(objectclass\=groupOfNames)

# The query to select objects that represent the groups to import that have changed since a certain time.
ldap.synchronization.groupDifferentialQuery=(&(objectclass\=groupOfNames)(!(modifyTimestamp<\={0}))) # The query to select all objects that represent the users to import. ldap.synchronization.personQuery=(objectclass\=inetOrgPerson) # The query to select objects that represent the users to import that have changed since a certain time. ldap.synchronization.personDifferentialQuery=(&(objectclass\=inetOrgPerson)(!(modifyTimestamp<\={0}))) # The group search base restricts the LDAP group query to a sub section of tree on the LDAP server. ldap.synchronization.groupSearchBase=dc\=roles,dc\=alfresco,dc\=armundia,dc\=com # The user search base restricts the LDAP user query to a sub section of tree on the LDAP server. ldap.synchronization.userSearchBase=dc\=users,dc\=armundia,dc\=com # The name of the operational attribute recording the last update time for a group or user. ldap.synchronization.modifyTimestampAttributeName=modifyTimestamp # The timestamp format. Unfortunately, this varies between directory servers. ldap.synchronization.timestampFormat=yyyyMMddHHmmss'Z' # The attribute name on people objects found in LDAP to use as the uid in Alfresco ldap.synchronization.userIdAttributeName=uid # The attribute on person objects in LDAP to map to the first name property in Alfresco ldap.synchronization.userFirstNameAttributeName=givenName # The attribute on person objects in LDAP to map to the last name property in Alfresco ldap.synchronization.userLastNameAttributeName=sn # The attribute on person objects in LDAP to map to the email property in Alfresco ldap.synchronization.userEmailAttributeName=mail # The attribute on person objects in LDAP to map to the organizational id property in Alfresco ldap.synchronization.userOrganizationalIdAttributeName=o # The default home folder provider to use for people created via LDAP import ldap.synchronization.defaultHomeFolderProvider=largeHomeFolderProvider # The attribute on LDAP group objects to map to the authority name property in Alfresco ldap.synchronization.groupIdAttributeName=cn # The attribute on LDAP group objects to map to the authority display name property in Alfresco ldap.synchronization.groupDisplayNameAttributeName=description # The group type in LDAP ldap.synchronization.groupType=groupOfNames # The person type in LDAP ldap.synchronization.personType=inetOrgPerson # The attribute in LDAP on group objects that defines the DN for its members ldap.synchronization.groupMemberAttributeName=member # If true progress estimation is enabled. When enabled, the user query has to be run twice in order to count entries. ldap.synchronization.enableProgressEstimation=true # Requests timeout, in miliseconds, use 0 for none (default) ldap.authentication.java.naming.read.timeout=0

Source:
https://forums.alfresco.com/forum/installation-upgrades-configuration-integration/authentication-ldap-sso/ldap-authentication-7

Chrome “special” pages
Date Created: November 14, 2012  Date Modified: November 14, 2012

Since I cant remember all of these I decided to post them here–Oh you dont know what they are?, there Chrome special pages which give you all sorts of fun info–some are self explanatory (and accessible via the interface) like bookmarks and history, some are informative if your troubleshooting and others Im still yet to figure out…

List of Chrome URLs

For Debug

The following pages are for debugging purposes only. Because they crash or hang the renderer, they’re not linked directly; you can type them into the address bar if you need them.

  • chrome://crash
  • chrome://kill
  • chrome://hang
  • chrome://shorthang
  • chrome://gpuclean
  • chrome://gpucrash
  • chrome://gpuhang
This rant was posted in Browsers, Chrome, Tips, Web on by .

Chrome Timeline
Date Created: September 9, 2012  Date Modified: September 10, 2012

Before Chrome came out we all loved the functionality firebug bought to firefox, and being that I have been using FF recently I had forgotten how much better Chrome’s debugging toolset is. One of the tools I missed was the timeline, being able to see a visulization of your scripts and their load is really something that does pleasth. I noticed as you can see in the pic below, what scripts were resource hungry, and also which image element I could optimise to save that bit of bandwidth.
To activate the timeline, just right click your page > inspect element > Click the Timeline tab, then hit the record button in the bottom left toolbar, 4th button along (black circle will turn red when recording).

Click this and refresh your page and watch the fun. Hit the record button again to stop recording once the page has stopped loading all its elements.
Looks like I have some site maintenance to do…

NOTE: The information used in the Chrome tool shows speeds of the Chrome browser, it is still worth checking this against other tools, as IE and Mozilla may load at different rates depending on a number of variables.

Google Reading Level
Date Created: September 3, 2012  Date Modified: September 3, 2012

As the internet expands its user base and more and more people take on the role of content creators the more likely you are to find less relevant information using a standard Google search. There are countless ways to filter results from a standard search; this post only addresses one–Reading Level. But before we get to this, lets look at some other tools used in the research arena…

Having worked in higherEd, I know the contention regarding Google Scholar, as often as I hear “Its the best, you should use it”, I also hear “Never, EVER use Google Scholar”. The reasons vary depending on what the field of study is, so ask you lecturer or tutor their thoughts on Google Scholar before you start using it for assignments. In the study of Laws, the use of tools like LexusNexus and WestLaw are far better resources than Google Scholar, as these advance searches are tailored for legal research, (they are also paid services).

Google Reading Level is not a standalone application, its just an advance search tool that can filter the results by the language used. This is great for sorting out links on the basis of the language level used. Advanced returns links more of the academic and legal reading level, the screen cap below shows WA State Parliament Hansard as the first result for the search string “Rayney Trial” (a high profile case that has exploded across the local media), where without the Advanced filter, the Hansard would be returned much further down the results (if at all).

In situations such as the above where there is a great deal of news articles, most of which rehash content from a handful of original sources (Court Journalists in this example), the ability to exclude results written for consumption by the general populace does speed up the research process.

This rant was posted in Google, Law, Tips on by .

Image Correction Made Easy
Date Created: May 3, 2010  Date Modified: January 7, 2013

Curves, Historgam, Selective Colour, Replace Colour, Channel Mixer, Gamma, Brightness and Contrast–So many ways to correct colour in photoshoop, however as I am the worlds greatest photographer, I never need to use these… SURE!

I took this pic when I was still getting use to the DSLR, its of my friends dog whos name I cannot divulge. As you can tell its overexposed.

I used Gamma to make it look less washed out

This pic of Perth hip-hop MC Xzact, was one I took on 35mm back when I was doing intro to photography, the scan is too bright but I never knew untill I brought an LCD monitor.

I adjusted the black by using curves–now you can see the grainyness of the film, and how dirty my lense was.

CSS tips for the experienced
Date Created: June 8, 2009  Date Modified: June 8, 2009

For those feeling like jumping into the CSS deep end here is a link to some tips you cant live without.

This rant was posted in CSS, Links, Tips on by .