Skip to content

Instantly share code, notes, and snippets.

View joet3ch's full-sized avatar

Joe Nicosia joet3ch

View GitHub Profile
#!/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;
#!/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()
<?php
/**
* Example for calling XML-RPC web service
*
*/
require_once 'Zend/XmlRpc/Client.php';
require_once 'Zend/Http/Client.php';
#!/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
#!/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
#!/usr/bin/python
import sys
import os
import urllib
API_KEY = '123456789'
REST_HOST = 'https://xxxx.com';
def main():
#!/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)
#!/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
index.php?parameter=1,2,5,3
index.php?parameter[]=1&parameter[]=2&parameter[]=5&parameter[]=3
$array = split(",", $_GET{parameter});
We couldn’t find that file to show.