Welcome To Snipplr
Everyone's Recent Snippets Tagged linux
- All /
- JavaScript /
- HTML /
- PHP /
- CSS /
- Ruby /
- Objective C
join characters inside file by extracting keyword which separate by newline and special characters by including desired numbers characters on right and left
0
1014
posted 6 years ago by brm
Install GPM using installer such as apt or dnf
All you have to do is save code with mouse.c file name and compile it : gcc -o mouse mouse.c -lgpm
and you got a "mouse" program that executes l.sh on left, r.sh on right and m.sh on middle mouse...
0
1360
posted 7 years ago by xyzeugene
There is a user-callback example in http://bazaar.launchpad.net/~bit-team/backintime/user-callback/view/head:/user-callback.apt-backup which will backup all package selections, sources and repository keys which are necessary to reinstall exactly the...
0
1026
posted 9 years ago by garretjames
Snippet found on forums to clean up /boot when too many kernels are installed. Though I think the script may need tweaking. Use at own risk!
0
715
posted 9 years ago by garretjames
this can obviously be easily adapted to any other device names. Some commands in here are redundant but all together are more likely to work.
1
5434
posted 10 years ago by blackthorne
This script finds out ALSA devices in Linux programatically, which can be a bit tricky.
0
883
posted 11 years ago by Makistos
This code will print out all sysfs devices under a certain device class (which is supplied as a parameter).
0
1386
posted 11 years ago by Makistos
This is a good way to show the difference between files side by side to quickly see what parts are not the same, if any.
0
948
posted 11 years ago by donkeykong
The telnet is insecure and unencrypted protocol. The use of this unencrypted protocol could allow users to sniff network traffic and to steal sensitive information like username and password.
0
981
posted 11 years ago by danielt72
With this script a new user gets created and gets his own VirtualHost and database. The username is used for building the domain, so the username "test" leads to the domain test.local.
The password for the MySQL account used for creating the datab...
1
998
posted 11 years ago by derbenni
In order to use a proxy by default for your network-based commands, create the file "~/.ssh/config" and give it these properties. Replace "proxyhost" with the hostname/IP of the proxy server and "80" with the port of the proxy server.
0
911
posted 11 years ago by deanhouseholder
Shell script written in bash which displays a menu giving the you ability to add, edit, modify, and delete users.
1
3331
posted 11 years ago by dego89
Use this snippet in Linux shell to install RVM and set it up for use with Sprockets.
0
824
posted 12 years ago by symsec
Tests whether the script has been invoked with the correct number of parameters.
0
684
posted 12 years ago by triffel
If you only want to show directories, replace "-type f" with "-type d".
0
908
posted 12 years ago by tinytiger
A fast way to delete many files without getting an 'Argument list too long' error as wold be the case with 'rm'.
0
778
posted 12 years ago by tinytiger
This script will do a daily backup of directories. If the files has not changed then it creates a hard-link to the file. If the file has changed then it will copy the new file. The backup is not much larger than the directories being backed up.
1
989
posted 12 years ago by _reydin_
Sets the permissions for all folders to 755, and for all files 644.
Useful for SUPHP configurations which required this specific permission setup.
0
891
posted 12 years ago by axertion