This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# add to ~/.bashrc | |
if ${use_color} ; then | |
# Enable colors for ls, etc. Prefer ~/.dir_colors #64489 | |
if type -P dircolors >/dev/null ; then | |
if [[ -f ~/.dir_colors ]] ; then | |
eval $(dircolors -b ~/.dir_colors) | |
elif [[ -f /etc/DIR_COLORS ]] ; then | |
eval $(dircolors -b /etc/DIR_COLORS) | |
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$output = shell_exec('/bin/ping -c 5 127.0.0.1'); | |
echo "<pre>$output</pre>"; | |
?> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# | |
# icecast This shell script takes care of starting and stopping | |
# the icecast multimedia streaming systen. | |
# | |
# config: /etc/icecast/icecast.xml | |
# Source function library. | |
. /etc/rc.d/init.d/functions |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
### BEGIN INIT INFO | |
# Provides: redmine | |
# Required-Start: $all | |
# Required-Stop: $all | |
# Default-Start: 2 3 4 5 | |
# Default-Stop: 0 1 6 | |
# Short-Description: redmine webrick | |
# Description: redmine webrick server autostart-script | |
### END INIT INFO |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ stat -c "%a %A %n" /usr/sbin/* | head | |
755 -rwxr-xr-x /usr/sbin/aa-status | |
777 lrwxrwxrwx /usr/sbin/accept | |
755 -rwxr-xr-x /usr/sbin/accessdb | |
755 -rwxr-xr-x /usr/sbin/acpid | |
777 lrwxrwxrwx /usr/sbin/addgroup | |
755 -rwxr-xr-x /usr/sbin/add-shell | |
755 -rwxr-xr-x /usr/sbin/adduser | |
755 -rwxr-xr-x /usr/sbin/anacron | |
755 -rwxr-xr-x /usr/sbin/apachetop |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
xinput --set-prop --type=int --format=32 "SynPS/2 Synaptics TouchPad" "Synaptics Two-Finger Pressure" 4 | |
xinput --set-prop --type=int --format=32 "SynPS/2 Synaptics TouchPad" "Synaptics Two-Finger Width" 8 | |
xinput --set-prop --type=int --format=8 "SynPS/2 Synaptics TouchPad" "Synaptics Two-Finger Scrolling" 1 0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
## ssh remoteserver.com 'bash -s' < commands.sh | |
# | |
## commands.sh example | |
sudo su | |
cd /web/remoteserver.com/ | |
git remote update | |
LOCAL=$(git rev-parse @) | |
REMOTE=$(git rev-parse @{u}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
function send_sms($mobile,$msg) | |
{ | |
$authKey = "XXXXXXXXXXX"; | |
date_default_timezone_set("Asia/Kolkata"); | |
$date = strftime("%Y-%m-%d %H:%M:%S"); | |
//Multiple mobiles numbers separated by comma | |
$mobileNumber = $mobile; | |
//Sender ID,While using route4 sender id should be 6 characters long. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
function send_email($to_email,$subject,$message1) | |
{ | |
require_once 'Mandrill.php'; | |
$apikey = 'XXXXXXXXXX'; //specify your api key here | |
$mandrill = new Mandrill($apikey); | |
$message = new stdClass(); | |
$message->html = $message1; | |
$message->text = $message1; |
OlderNewer