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
#!/usr/bin/perl | |
my $ifconfig = exec('ifconfig eth0 | grep inet | awk \'{print $2}\''); | |
$ifconfig =~ /\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}/; | |
print $ifconfig; |
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
#!/usr/bin/python | |
''' print all google contacts in xml ''' | |
import gdata.contacts.service | |
gd_client = gdata.contacts.service.ContactsService() | |
gd_client.ClientLogin('joe@yomomma.com', 'XXXXXXXXX') | |
query = gdata.contacts.service.ContactsQuery() |
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 | |
/** | |
* Example for calling XML-RPC web service | |
* | |
*/ | |
require_once 'Zend/XmlRpc/Client.php'; | |
require_once 'Zend/Http/Client.php'; |
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 | |
## | |
## update web site | |
## | |
if [ -f /tmp/site_update.lock ]; then | |
echo "This application is already running! You must manually clear the lockfile: /tmp/site_update.lock" | |
exit 1 | |
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
#!/bin/bash | |
## | |
## svn export and package for production | |
## | |
if [ -f /tmp/svnUpdate.lck ]; then | |
echo "This application is already running! You must manually clear the lockfile: /tmp/svnUpdate.lck" | |
exit 1 | |
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
#!/usr/bin/python | |
import sys | |
import os | |
import urllib | |
API_KEY = '123456789' | |
REST_HOST = 'https://xxxx.com'; | |
def main(): |
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 | |
DEFAULT_ALARM='current date' | |
alarm=$DEFAULT_ALARM | |
foo=`osascript <<EOF | |
tell application "iCal" | |
set newtodo to (make new todo at end of todos of calendar "Home") | |
tell newtodo | |
set summary to "Bills" | |
set due date to ($alarm) |
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
#!/usr/bin/expect -f | |
set force_conservative 1 ;# set to 1 to force conservative mode even if | |
;# script wasn't run conservatively originally | |
if {$force_conservative} { | |
set send_slow {1 .1} | |
proc send {ignore arg} { | |
sleep .1 | |
exp_send -s -- $arg |
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
index.php?parameter=1,2,5,3 | |
index.php?parameter[]=1¶meter[]=2¶meter[]=5¶meter[]=3 | |
$array = split(",", $_GET{parameter}); |
OlderNewer