- page 5

Check which server is serving the content from

Check which server is serving the content from

while true; do curl -s -I http://www.example.com/ | egrep Varnish-Host\|X-Cache | egrep –color pres\|X-Cache; done

Continue reading →

How to speed up terminal.app or iTerm on Mac OSX?

How to speed up terminal.app or iTerm on Mac OSX?

sudo rm /private/var/log/asl/*.asl Note *.asl, not all the files in the directory.

Continue reading →

How Can I Remove .DS_Store Files From A Git Repository?

How Can I Remove .DS_Store Files From A Git Repository?

find . -name .DS_Store -print0 | xargs -0 git rm –ignore-unmatch Also add “.DS_Store” to your git “.gitignore” file git add .gitignore git commit -m '.DS_Store bye bye!' UPDATED You might want to exclude some file for a specific repository then you can use: your-repo/.git/info/exclude…

Continue reading →

How to exclude .DS_Store from a zip file

How to exclude .DS_Store from a zip file

This can be easily achieved using your terminal zip -r foo.zip foo -x "*.DS_Store" Where: a. -r for recursively including all directories underneath the targets we want to zip. b. foo.zip is the name of the zip archive we are creating c. foo is the…

Continue reading →

How to list all users in ubuntu/linux

How to list all users in ubuntu/linux

cut -d: -f1 /etc/passwd

Continue reading →

Bash: Match a word in a string and return the word preceding it

Bash: Match a word in a string and return the word preceding it

The following shows how to match a word in a string and return previous word. The following will return “word1” base on “=” as a search term sed: echo "bla bla word word1 = string1 string2" | sed -e 's/.* \([^ ]*\) =.*/\1/g' perl: echo…

Continue reading →

How to run a different version of Java

How to run a different version of Java

Check the version installed: /usr/libexec/java_home -V Then choose the version you need to run: /usr/libexec/java_home -v 1.8.0_05 –exec java -version

Continue reading →

/etc/hosts vs /private/etc/hosts

/etc/hosts vs /private/etc/hosts

List of Mac symbolic links in private folder: ls -aFGl / | grep private This will return: lrwxr-xr-x@ 1 root wheel 11 Jan 9 12:43 etc@ -> private/etc drwxr-xr-x@ 6 root wheel 204 Jan 9 12:53 private/ lrwxr-xr-x@ 1 root wheel 11 Jan 9 12:44…

Continue reading →

How to downgrade Java.

How to downgrade Java.

In short: Uninstall Java plugin (Java Web Start) for your browser type: sudo rm -fr /Library/Internet\ Plug-Ins/JavaAppletPlugin.plugin To remove a specific Java version go to: /Library/Java/JavaVirtualMachines/ and remove the related jdk. If you want to remove the Java Control Panel you have under ‘System Preferences’…

Continue reading →

Remove and Disable Spotlight icon from top right bar

Remove and Disable Spotlight icon from top right bar

Hide: sudo chmod 600 /System/Library/CoreServices/Search.bundle/Contents/MacOS/Search killall SystemUIServer Show it again: sudo chmod 755 /System/Library/CoreServices/Search.bundle/Contents/MacOS/Search killall SystemUIServer To disable spotlight only instead, without removing it from the top menu: sudo launchctl unload -w /System/Library/LaunchDaemons/com.apple.metadata.mds.plist To enable it again: sudo launchctl load -w /System/Library/LaunchDaemons/com.apple.metadata.mds.plist

Continue reading →

Page 5 of 15 ← First ... 3 4 5 6 7 ... Last →