A PHP Error was encountered

Severity: Notice

Message: Memcache::connect(): Server localhost (tcp 11211, udp 0) failed with: Connection refused (111)

Filename: libraries/Cache.php

Line Number: 83

A PHP Error was encountered

Severity: Warning

Message: Memcache::connect(): Can't connect to localhost:11211, Connection refused (111)

Filename: libraries/Cache.php

Line Number: 83

Commands by evandrix | commandlinefu.com
Hide

What's this?

commandlinefu.com is the place to record those command-line gems that you return to again and again.

Delete that bloated snippets file you've been using and share your personal repository with the world. That way others can gain from your CLI wisdom and you from theirs too. All commands can be commented on, discussed and voted up or down.


If you have a new feature suggestion or find a bug, please get in touch via http://commandlinefu.uservoice.com/

Get involved!

You can sign-in using OpenID credentials, or register a traditional username and password.

First-time OpenID users will be automatically assigned a username which can be changed after signing in.

Hide

Stay in the loop…

Follow the Tweets.

Every new command is wrapped in a tweet and posted to Twitter. Following the stream is a great way of staying abreast of the latest commands. For the more discerning, there are Twitter accounts for commands that get a minimum of 3 and 10 votes - that way only the great commands get tweeted.

» http://twitter.com/commandlinefu
» http://twitter.com/commandlinefu3
» http://twitter.com/commandlinefu10

Subscribe to the feeds.

Use your favourite RSS aggregator to stay in touch with the latest commands. There are feeds mirroring the 3 Twitter streams as well as for virtually every other subset (users, tags, functions,…):

Subscribe to the feed for:

Hide

News

2012-05-20 - test
test
2012-05-20 - test
test
2012-05-20 - test
test
2012-05-20 - Test tweets
YU not working?
Hide

Tags

Hide

Functions

Commands by evandrix

Commands by evandrix from sorted by
Terminal - Commands by evandrix - 38 results
svn import /home/kaz/myproject svn+ssh://svn.FOO.codehaus.org/home/projects/FOO/scm/project1/trunk
cd /System/Library/LaunchDaemons; sudo launchctl load -w com.apple.metadata.mds.plist
for file in "* *"; do mv "${file}" "${file// /_}"; done
pdftk file.pdf dump_data output | grep -i Num
seq 1 1000000 | while read i; do echo -en "\r$i"; done
for i in $(seq 1 20); do while read line; do echo "$i: $line"; done<$i.py; done
history | cut -c8- | sort | uniq -c | sort -rn | head
netstat -tn | awk 'NR>2 {print $6}' | sort | uniq -c | sort -rn
grep --include=*.py -lir "delete" .
echo "John's" | grep -Po '\b\w+(?<!s)\b'
find . \( -name "*.as[pc]x" -o -name "*.htm*" \) -exec grep -Hi "jquery-1" {} +
egrep '(expr1|expr2)' file
2011-07-14 14:22:11
User: evandrix
Functions: egrep
-3

to find occurances of expr1 OR expr2

response.headers['Cache-Control'] = 'public, max-age=60';
2011-07-11 23:35:36
User: evandrix
-3

possible options:

* Varnish

* Squid in reverse proxy mode

* Django's cache framework

* rack-cache

* or CDN, like Akamai

comm -12 FILE1.sorted FILE2.sorted > common
scalac quicksort.scala && javap QuickSort
egrep -in "this|that" *.dat
2011-07-06 09:42:26
User: evandrix
Functions: egrep
-6

grep - Search file for character string

Search for one or more strings in one or more files. Examples:-

grep that myfile.txt

Look for the string ``that'' in the file called ``myfile.txt'' and print out each line that matches.

egrep -in "this|that" *.dat

Extended grep search *.dat files for ``this'' or ``that'' case insensitive (-i) and where found print line number (-n) along with the line contents.

sudo env ARCHFLAGS="-arch x86_64" gem install mysql
find . -name .svn -type d | parallel rm -rf
gem env
git branch -a | grep "remotes/origin" | grep -v master | awk -F / '{print $3}' | xargs -I % git clone -b % git://github.com/jamesotron/DevWorld-2010-Cocoa-Workshop %
gnutls-cli -V -r www.google.com |grep 'Session ID'
ps -eo pid,args | grep -v grep | grep catalina | awk '{print $1}'
echo .DS_Store >> ~/.gitignore
2011-06-24 12:10:25
User: evandrix
Functions: echo
1

With a couple of little commands, you?ll be able to ignore the .DS_Store files forever from your git repositories on mac!

The following command will add the .gitignore file to the git configuration

git config --global core.excludesfile ~/.gitignore

then, the following, will add the .DS_Store to the list

echo .DS_Store >> ~/.gitignore

cat /etc/*-release
git push origin :gh-pages