Skip to content

Instantly share code, notes, and snippets.

Isaac Shapira Fresheyeball

Block or report user

Report or block Fresheyeball

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View Pretty.elm
module Debug.Pretty exposing (..)
import String
import Native.Pretty
type alias Model =
( Int, List Char )
@Fresheyeball
Fresheyeball / gist:a7dcfe050334b0f0a3c2
Created Mar 25, 2016
Original Procedural Imperative Script
View gist:a7dcfe050334b0f0a3c2
‘use strict’;
var self = this;
var request = new XMLHttpRequest();
var categoryHeight = [];
debugger
request.open(‘GET’, ‘data/data.json’, true);
request.onload = function() {
if (request.status >= 200 && request.status < 400) {
// Success!
debugger
View Setup-FP-osx
brew update
brew install haskell-stack
apm update
apm install language-haskell haskell-ghc-mod ide-haskell autocomplete-haskell ide-haskell-repl haskell-pointfree haskell-hoogle
stack update
stack install ghc-mod stylish-haskell pointfree pointful
@Fresheyeball
Fresheyeball / gist:47bd43cd28b02e4e0ac0
Last active Aug 29, 2015
Vertical Thingy Disambiguator
View gist:47bd43cd28b02e4e0ac0
puts "vertical thingy disambiguator"
thingy = gets.chomp
if thingy.length > 1
puts "too many thingies dude"
elsif thingy.length < 1
puts "where is the thingy?"
else
View vertical-enable.iscroll.js
var point, pointStartX, pointStartY, deltaX, deltaY, isHorizontal;
var scroller = new iScroll('scrollerId', {
vScroll: false,
vScrollbar: false,
hScrollbar: false,
snap: 'li',
momentum: false,
onBeforeScrollStart: function(e) {
point = e.touches[0];
pointStartX = point.pageX;
@Fresheyeball
Fresheyeball / gist:6084675
Created Jul 25, 2013
Cake task to output code-coverage using coffeeCoverage mocha and jscoverage
View gist:6084675
generateServerReport = (server) ->
# 1. Copy server source into a new directory to be instrumented by [`jscoverage`](http://siliconforks.com/jscoverage/)
coverageDir = "#{server}-instrumented"
console.log "copying #{server} source to #{coverageDir} ..."
exec "mkdir #{coverageDir} && cp -r #{server}/* #{coverageDir} && cd #{coverageDir}", (err, stdout, stderr) ->
# 2. Use [`coffeeCoverage`](https://github.com/benbria/coffee-coverage) to instrument `.coffee` files
exclude = excludes[server].join ','
console.log "instrumenting #{coverageDir} excluding #{exclude} ..."
exec "coffeeCoverage --exclude #{exclude} . .", (er, out, err) ->
# 3. Run mocha tests with jscoverage integration sending output to an html file
You can’t perform that action at this time.