Skip to content

Instantly share code, notes, and snippets.

View jakiestfu's full-sized avatar
🌺

Jacob Kelley jakiestfu

🌺
View GitHub Profile
@jakiestfu
jakiestfu / rdiff.sh
Last active August 29, 2015 13:57
Git Remote Diff: Open the latest commit diff in GitHub
git config --global alias.rdiff '!g() { origin=`git config --get remote.origin.url`; origin=${origin/git@github.com:/https://github.com/}; url=${origin/.git/\/commit\/`git rev-parse HEAD`}; open $url; }; g'
@jakiestfu
jakiestfu / package.json
Last active January 3, 2016 12:49
Potential Medium.js Package.json
{
"name": "Medium.js",
"version": "1.0.0",
"repository": {
"type": "git",
"url": "https://github.com/jakiestfu/Medium.js"
},
"dependencies": {
"rangy": "https://github.com/jackcviers/Rangy",
"undo": "https://github.com/jzaefferer/undo"
@jakiestfu
jakiestfu / git.config.sh
Last active April 16, 2016 03:40
My favorite git snippets/settings
git config --global color.ui true
git config --global alias.undo-commit 'reset --soft HEAD^'
git config --global push.default current
@jakiestfu
jakiestfu / ko-money.js
Last active February 14, 2018 10:46
Used to display formatted money via Knockout binding
(function(){
var toMoney = function(num){
return '$' + (num.toFixed(2).replace(/(\d)(?=(\d{3})+\.)/g, '$1,') );
};
var handler = function(element, valueAccessor, allBindings){
var $el = $(element);
var method;
$ = jQuery
queues = {}
running = false
queue = (name) ->
name = 'default' if name is true
queues[name] or= []
next = (name) ->
var log = (function() {
var _log = console ? console.log.bind(console) : Function.prototype.valueOf();
return function() {
if (exports.debug) {
var args = Array.prototype.slice.call(arguments);
_log.apply(null, args);
}
};
})(),
This file has been truncated, but you can view the full file.
'use strict';
var COMPILED = !0, goog = goog || {};
goog.global = this;
goog.DEBUG = !1;
goog.LOCALE = "en";
goog.provide = function (a) {
if (!COMPILED) {
if (goog.isProvided_(a))
throw Error('Namespace "' + a + '" already declared.');
This file has been truncated, but you can view the full file.
'use strict';
var COMPILED = !0, goog = goog || {};
goog.global = this;
goog.DEBUG = !1;
goog.LOCALE = "en";
goog.provide = function (a) {
if (!COMPILED) {
if (goog.isProvided_(a))
throw Error('Namespace "' + a + '" already declared.');
<?PHP
class Diamonds{
private $math;
private $latex;
function makeExpressions(){
$style = $this->style;
@jakiestfu
jakiestfu / polyTexMe.js
Last active December 12, 2015 02:38
Ported to JS from https://gist.github.com/4700257 by @kelleydv This is a function in python that accepts a list of arrays. The arrays represent the coefficients of a polynomial, in increasing degree. For example, the array (1,0,3) represents the polynomial 3x^2+1. The output is an array of lines of LaTeX code suitable for insertion into an enume…
/*
* polyTexMe
* @param polynomials: Array
* @return: Array
*
* polyTexMe takes a list of coefficient-arrays,
* where the degree of the term is equal to the index
*/
var polyTexMe = function(polynomials){