Skip to content

Instantly share code, notes, and snippets.

[["-1","Google","http://www.google.com/search?q=TESTSEARCH",true],
["-1","Gmail+Docs","https://mail.google.com/mail/ca/u/0/#apps/TESTSEARCH",true],
["-1","Google Docs","https://docs.google.com/?tab=mo&authuser=0#search/TESTSEARCH",false],
["-1","Google Reader","http://www.google.com/reader/view/#search/TESTSEARCH/",false],
["-1","YouTube","http://www.youtube.com/results?search_query=TESTSEARCH",true],
["-1","Google Images","http://www.google.com/images?q=TESTSEARCH",true],
["-1","Wikipedia","http://en.wikipedia.org/w/index.php?title=Special:Search&search=TESTSEARCH",true],
["-1","Amazon","http://www.amazon.com/s/?url=search-alias%3Daps&field-keywords=TESTSEARCH&tag=carolynmonroe-20",true],
["-1","Google Play Store","https://play.google.com/store/search?q=TESTSEARCH",true],
["-1","Google Music","https://play.google.com/music/listen#TESTSEARCH_sr",true],
<?php
// GoogleVoice(EMAIL, PASSWORD)
$gv = new GoogleVoice('example@gmail.com', 'password');
// Sends an SMS. send_sms(NUMBER, MESSAGE)
echo $gv->send_sms('+15555555555', 'Example');
// Gets all the sms
// get_sms() - returns all the sms
// get_sms(true) - returns all the unread sms
echo $gv->get_sms();
import re
import urllib2
import urllib
import simplejson as json
# add my.ooma.com credentials here
username = ''
password = ''
opener = urllib2.build_opener(urllib2.HTTPCookieProcessor())
@jhaus
jhaus / wp-settings-api.php
Created December 21, 2010 06:35
Wordpress Settings API Example Usage
<?php
/*
Plugin Name: Settings API Example
Plugin URI: http://wpengineer.com/
Description: Complete and practical example of use of the Settings API to add fields on the Writing option page
Author: Ozh
Author URI: http://ozh.org/
*/
// We'll use ozhwpe (Ozh / WP Engineer) as a prefix throughout the plugin
// Register and define the settings
@jhaus
jhaus / wp-front-end-post-submit.php
Created December 29, 2010 08:51
basic wordpress template for front end posting via wordpress.stackexchange.com
<?php
$postTitle = $_POST['post_title'];
$post = $_POST['post'];
$submit = $_POST['submit'];
if(isset($submit)){
global $user_ID;
$new_post = array(
@jhaus
jhaus / gData-class.php
Created November 30, 2010 00:02
Saving Form Data to Google Spreadsheets Using PHP and the Google Docs API via: http://farinspace.com/saving-form-data-to-google-spreadsheets/
<?php
/*
Copyright (c) 2009 Dimas Begunoff, http://www.farinspace.com/
Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
"Software"), to deal in the Software without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
! Rules to limit FB tracking of me and doing various "scary" things.
! Read more: http://nikcub.appspot.com/logging-out-of-facebook-is-not-enough
!
! The filters live on the Customize tab of AdBlock Options in Chrome.
@@http://envoy510.blogspot.com/$document
@@||www.blogger.com^$document
@@|http://www.peteralfonso.com/2011/02/download-stock-rooted-gingerbread.html|$document
function parseURL(url) {
var a = document.createElement('a');
a.href = url;
return {
source: url,
protocol: a.protocol.replace(':',''),
host: a.hostname,
port: a.port,
query: a.search,
params: (function(){
@jhaus
jhaus / uri.js
Created May 7, 2012 20:09 — forked from jlong/uri.js
URI Parsing with Javascript
var parser = document.createElement('a');
parser.href = "http://example.com:3000/pathname/?search=test#hash";
parser.protocol; // => "http:"
parser.hostname; // => "example.com"
parser.port; // => "3000"
parser.pathname; // => "/pathname/"
parser.search; // => "?search=test"
parser.hash; // => "#hash"
parser.host; // => "example.com:3000"
@jhaus
jhaus / gdocs-audio-player-bookmarklet.js
Created January 4, 2012 22:13
Google Docs Audio Player. Prefix with "javascript:" when adding to bookmarks. Bookmarklet broken as of 2010.01.04.
function gup( name ){
var cre_getDocIdelement = document.getElementById( 'gbmpm_0_l' );
name = name.replace( /[\[]/,"\\\[" ).replace( /[\]]/,"\\\]" );
var regexS = "[\\?&]" + name + "=([^&#]*)";
var regex = new RegExp( regexS );
var results = regex.exec( cre_getDocIdelement );
if( results == null ) return "";