Skip to content

Instantly share code, notes, and snippets.

View jethrolarson's full-sized avatar
:shipit:

Jethro Larson jethrolarson

:shipit:
  • Tableau
  • Seattle
View GitHub Profile
React = require 'react'
{map} = require 'ramda'
{div, ul, li, button} = require ('./tag')
React.render ( div [
div [
'Assets:',
ul map ((a)-> li [a.type]), w.player.assets
]
button {onClick: act 'hurtAliens'}, 'Hurt aliens'
button {onClick: act 'getHelp'}, 'Get help'
// ==UserScript==
// @name Ramda filter
// @namespace http://jethrolarson.github.io
// @version 0.1
// @description Alternative search for ramda docs
// @author Jethro Larson
// @match http://ramdajs.com/*/docs/
// @grant none
// ==/UserScript==
@jethrolarson
jethrolarson / future_example.js
Last active August 29, 2015 14:23
Playing with Future
var R = require('ramda');
var Future = require('ramda-fantasy').Future;
//Wrap ajax in a future
//:: String -> Future String
var fetch = function(url) {
return new Future(function(rej, res){
var oReq = new XMLHttpRequest();
oReq.addEventListener("load", res, false);
oReq.addEventListener("error", rej, false);
oReq.addEventListener("abort", rej, false);
@jethrolarson
jethrolarson / Switched to new API
Created November 3, 2008 20:37
Ubiquity command for Firefox. Converts Selected markdown text to HTML with preview.
CmdUtils.CreateCommand({
names: ["convert"],
description: "Converts markdown text to html.",
help: "Select markdown text, hit enter to replace with converted html.",
author: {name: "Jethro Larson", email: "jethrolarson@gmail.com"},
license: "BSD",
homepage: "http://gist.github.com/21974",
arguments: [
{role: 'object', nountype: noun_arb_text,label:"markdown"},
{role:'goal',nountype:noun_arb_text, label:"html"}
CmdUtils.CreateCommand({
name: "hex-to-decimal",
icon: "",
homepage: "http://gist.github.com/gists/50159",
author: { name: "Jethro Larson", email: "jethrolarson@gmail.com"},
license: "GPL",
description: "Convert Hexidecimal Integer to Decimal",
help: "Enter a Hexidecimal number",
takes: {"Hex": noun_arb_text},
_toDec: function(Hex){
CmdUtils.CreateCommand({
name: "decimal-to-hex",
icon: "",
homepage: "http://jethro-larson.appspot.com",
author: { name: "Jethro Larson", email: "jethrolarson@gmail.com"},
license: "GPL",
description: "Convert Decimal Integer to Hex",
help: "Enter a Decimal number",
takes: {"Decimal": noun_arb_text},
_toDec: function(Decimal){
/*This is just a port of Arc90's Readibility bookmarklet
Props goes to them.
- Jethro Larson
*/
jetpack.statusBar.append({
html: <>
<div id="read">Readibility</div>
</>,
width: 70,
onReady: function(widget){

Jank (software)

  1. adj. Something that technically functions but is poorly implemented, hacky, or in desperate need of refactoring.
  2. n. Studdering or tearing that appears when scrolling an unperformant user interface.

###Examples###

  1. "The first release of Windows 10 is hella jank"
  2. "There's a lot of jank when scrolling on mobile tumblr"
//: Turn any function into a jQuery method
$.plug = function(name,func){
$[name]=func;
};
//: Turn any function into a jQuery plugin
$.fnPlug = function(name,func){
$.fn[name] = function(){
var args = arguments;
return self.each(function(){
$.fn.pollute = function (pollution) {
pollutants = {
air:"SMOAK",
water:"OIL",
noise:"BLAH"
}
window.emit = function(type) {
var i = Math.round(Math.random()*1000);