Skip to content

Instantly share code, notes, and snippets.

View christianchristensen's full-sized avatar

Chris Christensen christianchristensen

View GitHub Profile
@christianchristensen
christianchristensen / gist:2068869
Created March 18, 2012 04:20
iPhone full screen home "app" js bookmarklet
javascript:(function(){meta=document.createElement('meta'); meta.name='apple-mobile-web-app-capable';meta.content='yes';document.getElementsByTagName('head').item(0).appendChild(meta);alert('Now click add to homescreen')})();/*Installed*/
@christianchristensen
christianchristensen / gist:1982939
Created March 6, 2012 02:20
Drush tips and tricks + make, dl, .info inject

Did some testing with drush tonight and have some tips:

http://drupal.org/project/drush project has nice pear install info: (note: may need to sudo)

pear channel-discover pear.drush.org
pear install drush/drush-5.0.0 # note: there may be some instability, but seems ok
diff --git a/INSTALL.txt b/INSTALL.txt
index 821f391..f37aa35 100644
--- a/INSTALL.txt
+++ b/INSTALL.txt
@@ -1,4 +1,3 @@
-$Id$
*******************************************************
INSTALL.txt for logintoboggan.module for Drupal
@@ -28,7 +27,7 @@ as follows...

$ cat makefile

server:
	drush rs --watchdog
clock:
	while true; do drush cron -v; sleep 10s; done

$ cat Procfile

@christianchristensen
christianchristensen / gist:1783441
Created February 9, 2012 21:34
#api-craft thoughts
15:21 ghchinoy
I'm pretty psyched about where the api landscape is going, btw
15:21 ghchinoy
It's interesting, though, that sdks are effectively making a comeback
15:22 sramji
Yeah, maybe inevitable
15:22 ghchinoy
In a way, it's more organic than the violent proxying that WSDLs made for SOAP services, too.
15:22 sramji
:D I love that phrase "violent proxying"
@christianchristensen
christianchristensen / gist:1759543
Created February 7, 2012 12:49
OpenVPN CLI notes
## Quick Setup
sudo apt-get install byobu
sudo apt-get install htop
sudo apt-get install openvpn
# sudo apt-get install bitlbee
sudo apt-get install irssi
# cat ~/.ssh/id_rsa.pub >> ~/.ssh/authorized_keys
@christianchristensen
christianchristensen / gist:1759526
Created February 7, 2012 12:43
Irssi Bitlbee (~/.irssi/config)
servers = (
{
address = "HOST.NAME.HERE";
chatnet = "Bitlbee";
port = "6667";
use_ssl = "no";
ssl_verify = "no";
autoconnect = "yes";
}
);
@christianchristensen
christianchristensen / gist:1683963
Created January 26, 2012 17:40
nginx + php OSX local

(originally from: http://elytra.net/2011/03/31/hello-world/)

Howto

Install nginx+PHP:

brew install https://raw.github.com/ampt/homebrew/php/Library/Formula/php.rb --with-fpm --with-mysql --enable-cgi
brew install nginx
<?php
$fields = array(
"groups" => array("52d1c068-f611-11e0-a44b-12313d04fc0f"),
"title" => "Test Event Creation",
"description" => "Description test goes here...",
"date_time" => array(
"start" => "2012-02-15T08:05:00",
"end" => "2012-02-15T09:05:00",
),