Skip to content

Instantly share code, notes, and snippets.

View robertcedwards's full-sized avatar
🖼️
Framing

Robert C Edwards robertcedwards

🖼️
Framing
View GitHub Profile
@robertcedwards
robertcedwards / taxonomy.php
Created May 16, 2013 05:18
Registering a taxonomy
function people_init() {
// create a new taxonomy
register_taxonomy(
'people',
'post',
array(
'label' => __( 'People' ),
'rewrite' => array( 'slug' => 'person' ),
'capabilities' => array(
'assign_terms' => 'edit_guides',
@robertcedwards
robertcedwards / gist:5589587
Created May 16, 2013 05:29
People Taxonomy
// Register People Taxonomy
function custom_taxonomy() {
$labels = array(
'name' => _x( 'People', 'Taxonomy General Name', 'text_domain' ),
'singular_name' => _x( 'People', 'Taxonomy Singular Name', 'text_domain' ),
'menu_name' => __( 'Genre', 'text_domain' ),
'all_items' => __( 'All Genres', 'text_domain' ),
'parent_item' => __( 'Parent Genre', 'text_domain' ),
'parent_item_colon' => __( 'Parent Genre:', 'text_domain' ),
'new_item_name' => __( 'New Genre Name', 'text_domain' ),
@robertcedwards
robertcedwards / gist:5878823
Created June 27, 2013 18:06
Flat bootstrap
/* Flatten das boostrap */
.well, .navbar-inner, .popover, .btn, .tooltip, input, select, textarea, pre, .progress, .modal, .add-on, .alert, .table-bordered, .nav>.active>a, .dropdown-menu, .tooltip-inner, .badge, .label, .img-polaroid {
-moz-box-shadow: none !important;
-webkit-box-shadow: none !important;
box-shadow: none !important;
-webkit-border-radius: 0px !important;
-moz-border-radius: 0px !important;
border-radius: 0px !important;
border-collapse: collapse !important;
background-image: none !important;
@robertcedwards
robertcedwards / gist:5913096
Created July 2, 2013 21:04
Github post-receive hook
<?php echo `sudo su git pull 2>&1`;>
navigator.registerProtocolHandler("github-mac",
"github.com",
"github");
@robertcedwards
robertcedwards / gist:5970854
Created July 10, 2013 22:42
Pushing box + Ethernet + Cookie Jar
////
//
// General code from http://www.pushingbox.com for Arduino + Ethernet Shield (official) v1.2
//
////
#include <SPI.h>
#include <Ethernet.h>
// Pin for the LED
@robertcedwards
robertcedwards / gist:5973241
Created July 11, 2013 07:19
Add to [remote "origin"] section of .git/config: thanks: http://stackoverflow.com/users/117193/denbuzze
push = +refs/heads/master:refs/heads/gh-pages
push = +refs/heads/master:refs/heads/master
@robertcedwards
robertcedwards / HID_Card_Catcher
Created July 17, 2013 18:45
Arduino sketch for using a HID card reader to SD
//#include <SoftwareSerial.h>
#include <SdFat.h>
// since the LCD does not send data back to the Arduino, we should only define the txPin
//#define txPin 4 // White wire from Serial LCD screen
//const int LCDdelay = 10; // conservative, 2 actually works
// SD card variables
const uint8_t chipSelect = 10; // CS from SD to Pin 10 on Arduino
SdFat sd; // file system object for SD card
sudo gem update –-system
@robertcedwards
robertcedwards / gist:6059555
Created July 23, 2013 03:05
Quicklook manager refresh
qlmanage -r