Skip to content

Instantly share code, notes, and snippets.


Allie Jones alliejones

View GitHub Profile
View request.json
"assetVersion": "1976b95f7620d99923d9",
"locale": "en-US",
"view-id-1": {
"name": "web-toolkit-v2/modules/buttons/react/WtButton",
"data": {
"children": "I am a button"
"view-id-2": {
alliejones /
Created Aug 14, 2017
How to extend the web toolkit
  • use classes for everything, seriously everything

    • some html elements will have a ton of classes and that’s okay—-the fewer things a single CSS class does the easier it is to understand
    • in the vast majority of cases you shouldn't write your CSS rules using html tags (like a or li), add a class instead so your rules aren't as tightly coupled to markup (what if you need to swap out that a for a span later? hopefully you shouldn't have to change your CSS)
  • keep the specificity of your CSS rules as low as possible: a single class is the ideal

    • Sass makes it really easy to nest rules, but resist the urge; think about namespacing your classes instead
      It is easy and tempting to match your rule nesting to your DOM nesting:
alliejones / single.php
Last active Aug 29, 2015 — forked from lunacodes/single.php
Single Posts Template I'm trying to modify to exclude sidebar based on post-category - refer to the code in section Line 3
View single.php
<?php get_header(); ?>
<div class="row">
<div class="col-sm-12">
<?php if (!$category_is_press): ?>
<?php get_sidebar(); ?>
<?php endif ?>
import sys
import csv
import os
rows = []
input_file = sys.argv[1]
rows.append([ 'Date', 'Payee', 'Category', 'Memo', 'Outflow', 'Inflow' ])
with open(input_file, 'rb') as f:
View gist:022b9d3cc422bdc8bf36
# $Id: 991 2011-08-26 20:50:32Z joerg_wunsch $ -*- text -*-
# AVRDUDE Configuration File
# This file contains configuration data used by AVRDUDE which describes
# the programming hardware pinouts and also provides part definitions.
# AVRDUDE's "-C" command line option specifies the location of the
# configuration file. The "-c" option names the programmer configuration
# which must match one of the entry's "id" parameter. The "-p" option
# identifies which part AVRDUDE is going to be programming and must match

Keybase proof

I hereby claim:

  • I am alliejones on github.
  • I am alliejones ( on keybase.
  • I have a public key whose fingerprint is 8637 1116 9D22 31D4 0498 5D18 6C7F 21C2 A919 61D9

To claim this, I am signing this object:

alliejones / Gruntfile.js
Last active Dec 15, 2015
Gruntfile template. Includes lint, concat, uglify and watch as well as growl notifications of errors and warnings (requires npm growl package to be installed).
View Gruntfile.js
module.exports = function(grunt) {
var defaultTasks = ['jshint', 'concat', 'uglify']; // used for watch as well
var files = [ /* your source files */ ];
jshint: {
all: files.concat(['Gruntfile.js'])
alliejones / anonfunctions.php
Last active Dec 15, 2015
Anonymous functions in PHP 5.3
View anonfunctions.php
$my_array = array(1, 2, 3);
$new_array = array_map(function($num) { return $num * 2; }, $my_array); // $new_array: [2, 4, 6]
// Why the arguments are in the opposite order, I have no idea ...
$new_array2 = array_filter($my_array, function($num) { return $num % 2 == 0; }); // $new_array2: [2]
alliejones / recursion.js
Last active Jan 21, 2018
Toy recursion problems
View recursion.js
* Warm up: using no loops (for, while, etc.), and no global variables, write a function that returns the sum of a list:
* sum([1, 2, 3, 4, 5]) -> 15
* sum([]) -> 0
function sum (list) {
if (list.length == 0) return 0
else {
var head = list.shift();
return head + sum(list);
alliejones / inline-block.css
Last active Dec 11, 2015
Cross-browser inline block (IE7+)
View inline-block.css
li {
display: inline-block;
vertical-align: top;
zoom: 1;
*display: inline;