Skip to content

Instantly share code, notes, and snippets.

View jasperf's full-sized avatar
🏠
Working from home

Jasper Frumau jasperf

🏠
Working from home
View GitHub Profile
@jasperf
jasperf / grep-find-php-ini
Created July 7, 2014 11:53
Find your php.ini from the command line on a *Nix box using grep
php -i | grep "Loaded Configuration File"
@jasperf
jasperf / svn-commands
Last active August 29, 2015 14:03
SVN add files, commit files and then upload/push them to the remote repository from you local copy. Then check the status of commits and print changes.
//add directory recursively
svn add directory
// commit all and upload to the remote repository
svn ci -m "message"
//log of commits on working copy
//http://stackoverflow.com/questions/1464813/see-last-changes-in-svn
svn log --stop-on-copy
//for local status
svn status -u -v
//check last changes by printing them
@jasperf
jasperf / index-wordpress-resources.md
Last active August 29, 2015 14:04
Useful WordPress Plugins, code generators, WordPress snippets and other WordPress resources that will make your life as a WordPress developer so much easier. #wordpress #plugins
@jasperf
jasperf / apache-doc-root
Created July 17, 2014 14:07
Find my Apache Document Root #apache
grep --color DocumentRoot /etc/apache2/httpd.conf
@jasperf
jasperf / local-bitbucket-staging
Last active August 29, 2015 14:04
Useful Git commands for everyday management Repo #git
adduser --home /var/www <your_user>
su - <new_user>
//add user to webserver group Debian Ubuntu
useradd -G www-data username
ssh-keygen
cat .ssh/id_rsa.pub
//and add this content on BB
//https://gist.github.com/oodavid/1809044
@jasperf
jasperf / webreus-wordpress
Last active August 29, 2015 14:05
Webreus WordPress Need to Knows #wordpress http://webreus.nl
//Updaten van plugins gaat altijd vergezelt van deze error
Warning: An unexpected error occurred. Something may be wrong with WordPress.org or this server’s configuration. If you continue to have problems, please try the support forums. (WordPress could not establish a secure connection to WordPress.org. Please contact your server administrator.) in /var/www/vhosts/domain.com/httpdocs/wp-includes/update.php on line 287
@jasperf
jasperf / access-htaccess-protected-site
Last active August 29, 2015 14:05
Access a site password protected using http authentication bypassing the pop-up #apache
// You can add the username and password in url so you do not need to add it in the popup screen later on.
http://user:password@com.com/
@jasperf
jasperf / minification-check
Created August 19, 2014 11:56
Check to see if (Clouflare) minification is working on your site using curl #cloudflare #curl
//Cloudflare check by ip to avoid minification
curl 111.111.111.11/wp-content/themes/theme/script.js -H "Host: www.domain.com" -s | wc -c
//Check by canonical name to see file minified
curl http://www.domain.com/wp-content/themes/theme/js/script.js -s | wc -c
@jasperf
jasperf / curl-site-header-check
Created August 30, 2014 06:46
Using curl to get the site header and determine where the site is running with some extra details on the server #curl
curl -s -D - img.ubu -o /dev/null
@jasperf
jasperf / gist:91aa365454d00e44277d
Last active August 29, 2015 14:06
Stop Finder from indexing usb stick / flash drives / external harddisk by adding a hidden file #osx
cd /path/to/usb-drive
touch .metadata_never_index