Skip to content

Instantly share code, notes, and snippets.

View Fresheyeball's full-sized avatar

Isaac Shapira Fresheyeball

View GitHub Profile
@Fresheyeball
Fresheyeball / gist:6084675
Created July 25, 2013 23:15
Cake task to output code-coverage using coffeeCoverage mocha and jscoverage
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
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:47bd43cd28b02e4e0ac0
Last active August 29, 2015 14:14
Vertical Thingy Disambiguator
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
@Fresheyeball
Fresheyeball / chat-logo.png
Last active August 29, 2015 14:23
lr-chat
chat-logo.png
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:a7dcfe050334b0f0a3c2
Created March 25, 2016 01:25
Original Procedural Imperative Script
‘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
module Debug.Pretty exposing (..)
import String
import Native.Pretty
type alias Model =
( Int, List Char )

Keybase proof

I hereby claim:

  • I am fresheyeball on github.
  • I am fresheyeball (https://keybase.io/fresheyeball) on keybase.
  • I have a public key ASD71T0wX_v3qIw9eUko5s_b_cCvgYs6J4vroJAlGZWXJgo

To claim this, I am signing this object:

{-# LANGUAGE AllowAmbiguousTypes #-}
{-# LANGUAGE CPP #-}
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE DuplicateRecordFields #-}
{-# LANGUAGE ExtendedDefaultRules #-}
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE ImpredicativeTypes #-}
{-# LANGUAGE InstanceSigs #-}
{-# LANGUAGE LambdaCase #-}
@Fresheyeball
Fresheyeball / Shpa.hs
Last active August 26, 2020 15:55 — forked from abradley2/Shpa.hs
Being silly with Shpadoinkle
{-# LANGUAGE GeneralizedNewtypeDeriving #-}
{-# LANGUAGE OverloadedStrings #-}
module Main where
import Data.Text
import Shpadoinkle as S
import Shpadoinkle.Backend.ParDiff