Skip to content

Instantly share code, notes, and snippets.

View og-shawn-crigger's full-sized avatar

Shawn Crigger og-shawn-crigger

View GitHub Profile
@og-shawn-crigger
og-shawn-crigger / content.php
Created May 15, 2012 14:09 — forked from rsmarshall/content.php
search method
public function search()
{
Console::log($this->input->get_post('search_feeds'));
$data = array(
'search_feeds' => $this->input->get_post('search_feeds')
);
Console::log($data);
$this->form_validation->set_data($data);
@og-shawn-crigger
og-shawn-crigger / css-nthchildn.js
Created April 4, 2012 18:15 — forked from meyertee/css-nthchildn.js
Modernizr Test 'nthchildn'
// Test for nth-child(...n) support
Modernizr.testStyles(" #modernizr div:nth-child(3n){width:10px;} ", function(elem, rule){
var bool = false, divs = elem.getElementsByTagName("div");
if (divs.length == 7){
var test = window.getComputedStyle ? function(i){
return getComputedStyle(divs[i], null)["width"] == "10px";
} : function(i){
return divs[i].currentStyle["width"] == "10px";
};
bool = !test(0) && !test(1) && test(2) && !test(3) && !test(4) && test(5) && !test(6);
@og-shawn-crigger
og-shawn-crigger / Stop google spyware
Created March 30, 2012 16:03
Installs or updates Chromium (mac)
#!/bin/bash
mkdir /tmp/chromedownload && cd /tmp/chromedownload
curl http://build.chromium.org/f/chromium/snapshots/chromium-rel-mac/LATEST -o /tmp/chromedownload/LATEST --silent && LATEST=`cat /tmp/chromedownload/LATEST`
curl http://build.chromium.org/f/chromium/snapshots/chromium-rel-mac/$LATEST/chrome-mac.zip -o /tmp/chromedownload/chrome-mac.zip --silent
unzip -qq /tmp/chromedownload/chrome-mac.zip
cp -R /tmp/chromedownload/chrome-mac/Chromium.app /Applications
rm -rf /tmp/chromedownload
@og-shawn-crigger
og-shawn-crigger / MarkItUpInlineUpload.js
Created March 9, 2012 00:13 — forked from dkharrat/MarkItUpInlineUpload.js
upload feature for markitup...copied from http://pastebin.ca/1763467 as pastebin.ca seems to be down.
// ----------------------------------------------------------------------------
// markItUp!
// ----------------------------------------------------------------------------
// Copyright (C) 2008 Jay Salvat
// http://markitup.jaysalvat.com/
// ----------------------------------------------------------------------------
// Html tags
// http://en.wikipedia.org/wiki/html
// ----------------------------------------------------------------------------
// Basic set. Feel free to add more tags