beneberle


Member since 06/18/2009

43 snippets

5937 profile views

0 Comment(s) Posted

View their favorites

Profile

Achievement

first submission:submitting first snipplet

beneberle's Recent Snippets



« Prev 1 2
http://yuji.wordpress.com/2010/06/11/git-delete-remote-branch/
1 1098 posted 12 years ago by beneberle
This example will go get the latest version of wordpress and save it as "wordpress-latest.tar.gz" in the current directory. Note, don't include the protocal (http://) in the url.
0 822 posted 12 years ago by beneberle
Combine multiple smaller incremental commits into larger ones, perfect for encouraging you to commit often while enabling you to summarize a day's work into one, or more, simplified commit. WARNING: Only do this on commits that haven’t been push...
0 942 posted 12 years ago by beneberle
Create custom web clip icons or "app logos" in various sizes to be displayed (instead of the default site snapshot) when users save your site to their Home screens. Across Safari iOS devices. Add in the <head> in the same place you call your norm...
0 928 posted 12 years ago by beneberle
Condition = The condition which must be met. True = Executed if the condition is met. False = Executed if the condition failes.
0 753 posted 12 years ago by beneberle
1 896 posted 13 years ago by beneberle
If you need to zip a directory named folderName and ignore all .DS_Store files, then do the following:
0 833 posted 13 years ago by beneberle
0 743 posted 13 years ago by beneberle
Basic sample courtesy of John Martin @ www.bigspring.co.uk/
0 849 posted 13 years ago by beneberle
First, find the proper package from http://www.joomla.org/download/ and copy its path. Then, over ssh, navigate to the root of the joomla install and perform these commands. In the case of an upgrade, this will overwrite in place the needed files, an...
0 880 posted 13 years ago by beneberle
0 807 posted 13 years ago by beneberle
getCategory returns the category ID, getSection returns the section alias. Great for CSS overrides
0 937 posted 13 years ago by beneberle
function for determining the section ID of a given page. Good to include in a templatetools.php file inside of a template to set up some custom conditional logic
0 878 posted 13 years ago by beneberle
This simple script toggles element visiblity on a page based on a form field's current value.
0 935 posted 13 years ago by beneberle
Though an old post, this is my solution that's been pieced together from various comments on the article linked above.
1 1349 posted 13 years ago by beneberle
I set up an $isHome boolean variable at the beginning of a template's index.php file so I can easily test the condition throughout the file. To me, the semantic variable name makes the logic more readable.
0 646 posted 14 years ago by beneberle
Big ups to Tom Gidden for this one. If you\'re not all that happy about some of the changes in iTunes 10, or if you\'d rather look through your own library instead of the itunes store, give these a try.
0 810 posted 14 years ago by beneberle
I needed to trim a simple numerical array that might have duplicate values into an array with no duplicates. I came up with this before finding array_unique(). D\'oh.
0 902 posted 14 years ago by beneberle
the -r means it's recursive, the f suppresses the need to confirm every file deletion.
0 870 posted 14 years ago by beneberle
Substitute new_ placeholder in the second line with your new prefix. Run it: http://www.yoursite.com/rename.php and wait until it responds with an OK, usually after a couple of seconds. Delete the rename.php script. Edit the configuration.php file...
0 958 posted 14 years ago by beneberle
<p>Method 1</p> <p>The -c directive creates a file .htpass in the directory somepath/outside/of/root/ containing a username user1. The -b directive means you must supply the password password1 at the command line when running the command - not rec...
3 880 posted 14 years ago by beneberle
Put this in an .htaccess file to protect the directory it is in and anything below it. This requires that a file named .passwdfile exists in the directory \\\"/full/path/to/\\\" and contains at least one username/password combination.\\r\\n\\r\\nUse...
2 702 posted 14 years ago by beneberle
This is good for ensuring your domain is always either accessed with or without the www, which is important for SEO. It is also good if you have multiple domains that should resolve to the same site, and can redirect all requests to the main domain.
2 794 posted 14 years ago by beneberle
0 671 posted 14 years ago by beneberle
You will be prompted for a password after issuing this command
1 817 posted 14 years ago by beneberle
« Prev 1 2