Skip to content

Instantly share code, notes, and snippets.

View cmbirk's full-sized avatar

Chris Birk cmbirk

View GitHub Profile

Contract Killer

The popular open-source contract for web designers and developers by Stuff & Nonsense

  • Originally published: 23/12/2008
  • Revised date: 15/12/2013
  • Original post

<?php
/*
* Translate a non-standard object into an associative array object.
* Super-useful for dealing with simplexml objects.
*/
function simpleXML_to_object($obj)
{
$data = new StdClass();
if(
(is_object($obj) && get_class($obj) == 'SimpleXMLElement')
@cmbirk
cmbirk / friday.js
Created February 22, 2014 19:10 — forked from krusynth/friday.js
function friday(e) {
if(e) {
// Not doin' nothin', it's Friday.
e.preventDefault();
}
/************$~I**************************Z*********************************
***********O,7.++O$+********************O,..ZI******************************
***********$..$.78.$******************$...7+. ~Z*******************+********
***********.Z.~.7D.O****************O,...,+. ....+Z*************7O+77I*+****
@cmbirk
cmbirk / es.sh
Created January 7, 2014 19:58 — forked from rajraj/es.sh
cd ~
sudo yum update
sudo yum install java-1.7.0-openjdk.i686 -y
wget https://github.com/downloads/elasticsearch/elasticsearch/elasticsearch-0.19.9.tar.gz -O elasticsearch.tar.gz
tar -xf elasticsearch.tar.gz
rm elasticsearch.tar.gz
mv elasticsearch-* elasticsearch
sudo mv elasticsearch /usr/local/share
#!/bin/bash
filedir=$1;
echo "Starting converstion to mp4 script"
if [ -d "$filedir" ]; then
cd "$filedir"
for file in ./* ;
do
if [[ $file = *.mkv || $file = *.avi ]] ; then