Skip to content

Instantly share code, notes, and snippets.

Avatar

Isaac Shapira Fresheyeball

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

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:

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.