Welcome To Snipplr
Everyone's Recent Snippets Tagged Bash
- All /
- JavaScript /
- HTML /
- PHP /
- CSS /
- Ruby /
- Objective C
Put this script in your path and you can start your scripts located in ~/.groovy/scripts from everywhere.
Tags: Bash, Linux, Groovy
0
893
posted 15 years ago by mahome
obviously change url. you'll get (better formatted) something like...
curl -o /dev/null -w %{time_total}\\n http://www.google.com
% Total % Received % Xferd Average Speed Time Time Time Current
D...
0
559
posted 15 years ago by nategood
you have to collect the filenames from 'find' in an input file then open the input in this script
0
806
posted 15 years ago by rowntreerob
* Resized images are generated into TARGET_DIR.
* Change the resolution (800x800 in my example) and quality (80) as you want.
* The command keeps the image's proportion. 1600x1200 will be converted into 800x600, 1200x1600 into 600x800.
_Notice_:...
2
1053
posted 15 years ago by Dorgendubal
Useful when you have to deal with ClassNotFoundException. The command looks for all jar in the current directory and any sub-directory, and checks if the jar contains the specified class. The command lists all matching jars.
0
1036
posted 15 years ago by Dorgendubal
Useful to quickly identify processes listening to ports (to eventually kill them).
0
804
posted 15 years ago by Dorgendubal
Useful to convert all matching files from one encoding to another.
Some examples:
1
1127
posted 15 years ago by Dorgendubal
* _HOST_: remote host
* _PORT_: ssh port (default 22)
* _PATH_: remote path to synchronize
0
679
posted 15 years ago by Dorgendubal
1. Save under .gnome2/nautilus-scripts/
2. Right click some video file
3. Select Scripts->toFlv
Works with multiple files.
1
1049
posted 15 years ago by ping_ch
Running a btrace script takes two separate steps by default:
1. Running jps to get the Java process ID.
2. Running btrace on the ID.
A simple awk script can merge the two into a single step.
0
796
posted 15 years ago by narkisr
How to run a KVM VM with no X (server environment, originally seen at http://blog.bodhizazen.net/?p=40).
0
743
posted 15 years ago by narkisr
Clear files in /tmp directory that are older than three days - terminal/cron
this is a very simple example - could also remove by last access time, etc.
0
798
posted 15 years ago by inkdeep
This snippet shows how to restore HEAD after using Git's reset method (see http://gitready.com/2009/01/17/restoring-lost-commits.html?disqus_reply=5271828#comment-5271828).
0
767
posted 15 years ago by narkisr
Alle Verzeichnisse überprüfen: [script name] verzeichnis1 verzeichnis2
Alle Dateien vom Typ *html: [script name] verzeichnis1 verzeichnis2
0
649
posted 15 years ago by endorfin
To see how we can set default values for bash script variables inside bash script
0
936
posted 15 years ago by jaduks