Skip to content

Instantly share code, notes, and snippets.

View gist:1ae348f9ff33d8b9bf39
Dope stuff
Visualizing Art of War
https://hbr.org/2015/02/visualizing-sun-tzus-the-art-of-war
@benbaker
benbaker / grade_c_programs.sh
Created Oct 30, 2014
Quickly walk, compile, and run every subdirectory
View grade_c_programs.sh
#!/bin/sh
# Quickly compile and run code for grading.
# ------------------------------------------------------------------------------
# Initiate and configure
# ------------------------------------------------------------------------------
usage()
{
echo "\033[33m\ncs_grade!\033[0m"
@benbaker
benbaker / gist:d873edfb0366ecced154
Created Oct 30, 2014
Time travel and grade a git repository
View gist:d873edfb0366ecced154
#!/bin/sh
# Run a command over a sequence of commits and get analytics on repo activity
# Example:
# ./gradethis origin/master 'make clean && make' > graded/build_history.txt
clear
help(){
echo "\n\nGradeThis!\n\n A tool for grading classes based on repository activity."
echo "\n\n Usage:\n"
View gist:d380abe7953220100ffb
#!/bin/sh
# Quickly compile and run code for grading.
# ------------------------------------------------------------------------------
# Initiate and configure
# ------------------------------------------------------------------------------
usage()
{
echo "\033[33m\ncs_grade!\033[0m"
View $.serializeObject()
$.fn.serializeObject = function()
{
var o = {};
var a = this.serializeArray();
$.each(a, function() {
if (o[this.name] !== undefined) {
if (!o[this.name].push) {
o[this.name] = [o[this.name]];
}
o[this.name].push(this.value || '');
@benbaker
benbaker / gist:b7beb3c6e66188515738
Created Jun 15, 2014
Bash: Kill all processess container word
View gist:b7beb3c6e66188515738
kill $(ps aux | grep 'node' | awk '{print $2}')
@benbaker
benbaker / gist:8205022
Created Jan 1, 2014
big blue bootstrap
View gist:8205022
/*!
* Bootstrap v2.0.4
*
* Copyright 2012 Twitter, Inc
* Licensed under the Apache License v2.0
* http://www.apache.org/licenses/LICENSE-2.0
*
* Designed and built with all the love in the world @twitter by @mdo and @fat.
*/article,aside,details,figcaption,figure,footer,header,hgroup,nav,section{display:block}audio,canvas,video{display:inline-block;*display:inline;*zoom:1}audio:not([controls]){display:none}html{font-size:100%;-webkit-text-size-adjust:100%;-ms-text-size-adjust:100%}a:focus{outline:thin dotted #333;outline:5px auto -webkit-focus-ring-color;outline-offset:-2px}a:hover,a:active{outline:0}sub,sup{position:relative;font-size:75%;line-height:0;vertical-align:baseline}sup{top:-0.5em}sub{bottom:-0.25em}img{max-width:100%;vertical-align:middle;border:0;-ms-interpolation-mode:bicubic}#map_canvas img{max-width:none}button,input,select,textarea{margin:0;font-size:100%;vertical-align:middle}button,input{*overflow:visible;line-height:normal}button::-moz-focus-inner,input::-moz-focus-inner{padding:0;
@benbaker
benbaker / gist:8179338
Created Dec 30, 2013
jquery to add spans on regex
View gist:8179338
$('p.menu').html(function(i,el) {
return el.replace(/\|/g, '<span class="sp">|</span>');
});​
View language.md
model
  • invariant dictionary
controller
  • syntax
  • morphology
  • phonology
view
View flatten bootstrap
/* Flatten boostrap */
.well, .navbar-inner, .popover, .btn, .panel, .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;
You can’t perform that action at this time.