Welcome To Snipplr
Everyone's Recent Bash Snippets
- All /
- JavaScript /
- HTML /
- PHP /
- CSS /
- Ruby /
- Objective C
A pair of handy terminal commands for converting Apple .plist preference files from binary to XML format [allowing for easy editing with a text editor] and then back to binary again, afterwards.
0
1349
posted 13 years ago by stiobhart
tar is usually used for achiving applications, but what we are going to do in this case is tar it then pipe it over an ssh connection. tar handles large file trees quite well and preserves all file permissions, etc, including those UNIX systems which...
0
839
posted 13 years ago by wnasich
From the Pickaxe, 4th edition, p. 352:
A rescue clause with no parameter is treated as if it had a parameter of StandardError. This means that some lower-level exceptions will not be caught by a parameterless rescue class. If you want to rescue ev...
1
815
posted 13 years ago by cczona
must install flac and lame
apt-get install flac
apt-get install lame
0
692
posted 13 years ago by pbreah
Now when you do a git commit without specifying a commit message, TextMate will pop-up and allow you to enter a commit message in it. When you save the file and close the window, the commit will go through as normal. (If you have another text editor...
0
1337
posted 13 years ago by magicrebirth
Open up your terminal and type in the following commands to show hidden files (such as a .htaccess file).
0
880
posted 13 years ago by BFTrick
Because our server is a virtual machine inside a virtual machine (it's like inception), we can't transfer file using FTP. You need using SVN repository as a bridge to do so.
Follow [Exercise 3](http://www.cs.sfu.ca/cc/470/ggbaker/exer/3 "Exercise...
0
850
posted 13 years ago by Xixian
Bash
Delete all files of a directory which contains a specific contents, no mather the size of the directory
0
929
posted 13 years ago by ferro
Here's a quick one-off trick for sed editing conf files on remote hosts. I will
post the core sed command first, showing the crazy quoting, then a for loop demonstrating how one might tackle multiple hosts. Took me a few tries to get the quoting so...
0
578
posted 13 years ago by bubnoff
See also http://www.gnu.org/software/bash/manual/bashref.html#Bindable-Readline-Commands for the standard bindings and more detailed explanation of what they do.
0
938
posted 13 years ago by cczona
A simple but useful command. List processes running on the system.
0
627
posted 13 years ago by klovera
When modifying file permissions it is sometimes necessary to go back to the drawing board and set back to the default permissions. The following command can be used via ssh and takes a couple seconds vs trying to do this via ftp file by file (which c...
0
684
posted 13 years ago by klovera
If you need to zip a directory named folderName and ignore all .DS_Store files, then do the following:
0
824
posted 13 years ago by beneberle
This allow serve web pages to internet behind a firewall, using a linux server with a public IP address running sshd.
We must have root credentials and sshd configured with: GatewayPorts yes
0
780
posted 13 years ago by wnasich