Skip to content

Instantly share code, notes, and snippets.

View jesgs's full-sized avatar
🍜
Ramen connoisseur

Jess Green jesgs

🍜
Ramen connoisseur
View GitHub Profile
@jesgs
jesgs / parse_xlsx.php
Last active August 29, 2015 14:19 — forked from searbe/parse_xlsx.php
<?php
/**
* I had to parse an XLSX spreadsheet (which should damn well have been a CSV!)
* but the usual tools were hitting the memory limit pretty quick. I found that
* manually parsing the XML worked pretty well. Note that this, most likely,
* won't work if cells contain anything more than text or a number (so formulas,
* graphs, etc ..., I don't know what'd happen).
*/
@jesgs
jesgs / fcserver.json
Created May 13, 2015 00:22
fcserver config for working with 12mm LEDs (strands of 50)
{
"listen": [ null, 7890 ],
"verbose": true,
"color": {
"gamma": 2.5,
"whitepoint": [ 0.9, 0.9, 0.9 ]
},
"devices": [
{
"type": "fadecandy",
@jesgs
jesgs / login-styles-removal.php
Last active August 29, 2015 14:23
A method for removing all default styles from WordPress login screen.
<?php
/**
* Remove all WordPress-specific stylesheets from WordPress login screen
*/
/**
* Force-remove login-related styles. Can't use the regular method of login_enqueue_scripts
* due to wp_admin_css running before login_enqueue_scripts
*
@jesgs
jesgs / wp-framework-example.php
Last active October 13, 2015 04:08
WordPress Post-Type Framework Example
<?php
add_action('init', 'theme_post_types');
/**
* Reqister Post-Types
*
* @return void
*/
function theme_post_types()
{
//example #1:
@jesgs
jesgs / us-states-php-arrays.php
Last active December 11, 2015 04:48
US States PHP Arrays
<?php
/* States */
$us_states = array(
'alabama' => 'Alabama',
'alaska' => 'Alaska',
'arizona' => 'Arizona',
'arkansas' => 'Arkansas',
'california' => 'California',
'colorado' => 'Colorado',
@jesgs
jesgs / us-states-acf-fields.txt
Last active December 11, 2015 04:48
US States (For Advanced Custom Fields drop-downs)
AL : ALABAMA
AK : ALASKA
AS : AMERICAN SAMOA
AZ : ARIZONA
AR : ARKANSAS
CA : CALIFORNIA
CO : COLORADO
CT : CONNECTICUT
DE : DELAWARE
DC : DISTRICT OF COLUMBIA
@jesgs
jesgs / us-states.html
Created January 16, 2013 16:47
US States (HTML)
<select name="State">
<option value="" selected="selected">Select a State</option>
<option value="AL">Alabama</option>
<option value="AK">Alaska</option>
<option value="AZ">Arizona</option>
<option value="AR">Arkansas</option>
<option value="CA">California</option>
<option value="CO">Colorado</option>
<option value="CT">Connecticut</option>
<option value="DE">Delaware</option>
@jesgs
jesgs / walker-category.php
Last active December 11, 2015 16:18
Add checkboxes to categories using a Walker class and wp_list_categories
<?php
/**
* My Project
*
* @package MyProject
* @subpackage JesGs_Walker_Category
* @author Jess Green <jgreen@psy-dreamer.com>
* @version $Id$
*/
@jesgs
jesgs / vimrc
Last active December 13, 2015 20:58
Vim config file
" General
set number
set showbreak=+++
set showmatch
set visualbell
"set mouse=a "for mouse support
set hlsearch
set smartcase
set ignorecase
@jesgs
jesgs / bashrc
Last active December 13, 2015 22:49
bashrc file
export APPLICATION_ENV=development
export SVN_EDITOR='/usr/bin/vim'
alias la='ls -la --color'
PS1="[\h:\\W] $ "
#source ~/.gitsource