Skip to content

Instantly share code, notes, and snippets.

@taksuyu
taksuyu / learning-lens.md
Last active October 30, 2017 23:46
A list of material that helped me learn the lens package.

Learning Lens

I tend to focus on core concepts quite a bit more than actual examples, so that the fundamental understanding of what the examples are trying to teach me is building on skills I already have just haven't figured out how to use yet.

tl;dr Your mileage may vary. I learn kind of counterintuitively for others.

Since this seemed to be popular, I decided to make a repository for content about haskell topics that you can find here new materials for lens will be put here

@nightfly19
nightfly19 / gist:ef5d907deeb5c1c8e1f2
Created September 13, 2014 18:46
Notes from Bart's webcomics session at CAT BarCamp
https://xkcd.com/
http://www.schlockmercenary.com
http://axecop.com/
http://www.gunnerkrigg.com/
http://avasdemon.com/
http://www.smbc-comics.com/
http://www.qwantz.com/index.php
http://www.lackadaisycats.com/
http://thepunchlineismachismo.com/
http://www.darthsanddroids.net/
@staltz
staltz / introrx.md
Last active May 23, 2024 20:07
The introduction to Reactive Programming you've been missing

Latency numbers every programmer should know

L1 cache reference ......................... 0.5 ns
Branch mispredict ............................ 5 ns                     on recent CPU
L2 cache reference ........................... 7 ns                     14x L1 cache
Mutex lock/unlock ........................... 25 ns
Main memory reference ...................... 100 ns                     20x L2 cache, 200x L1 cache
Compress 1K bytes with Zippy ............. 3,000 ns  =   3 µs
Send 2K bytes over 1 Gbps network ....... 20,000 ns  =  20 µs
SSD random read ........................ 150,000 ns  = 150 µs

Read 1 MB sequentially from memory ..... 250,000 ns = 250 µs 4X memory

@timmytofu
timmytofu / ghcPkgUtils.sh
Last active June 6, 2020 12:02 — forked from simonmichael/gist:1185421
ghc-pkg-clean and ghc-pkg-reset compatible with both zsh and bash
# unregister broken GHC packages. Run this a few times to resolve dependency rot in installed packages.
# ghc-pkg-clean -f cabal/dev/packages*.conf also works.
function ghc-pkg-clean() {
for p in `ghc-pkg check $* 2>&1 | grep problems | awk '{print $6}' | sed -e 's/:$//'`
do
echo unregistering $p; ghc-pkg $* unregister $p
done
}
# remove all installed GHC/cabal packages, leaving ~/.cabal binaries and docs in place.
@maccman
maccman / app.py
Created August 8, 2012 23:30
Stripe Flask Example
import os
from flask import Flask, render_template, request
import stripe
stripe_keys = {
'secret_key': os.environ['SECRET_KEY'],
'publishable_key': os.environ['PUBLISHABLE_KEY']
}
stripe.api_key = stripe_keys['secret_key']
@simonmichael
simonmichael / gist:1185421
Created September 1, 2011 03:59
ghc-pkg-clean, ghc-pkg-reset
# unregister broken GHC packages. Run this a few times to resolve dependency rot in installed packages.
# ghc-pkg-clean -f cabal/dev/packages*.conf also works.
function ghc-pkg-clean() {
for p in `ghc-pkg check $* 2>&1 | grep problems | awk '{print $6}' | sed -e 's/:$//'`
do
echo unregistering $p; ghc-pkg $* unregister $p
done
}
# remove all installed GHC/cabal packages, leaving ~/.cabal binaries and docs in place.
@itszero
itszero / kb-ipad.html
Created May 14, 2011 11:44
CSS iPhone Keyboard Clone
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-type" content="text/html; charset=utf-8">
<title>Keyboard</title>
<style type="text/css">
#keyboard {
background-image: -webkit-gradient(linear, 0% 0%, 0% 100%, color-stop(0%, #9199A4), color-stop(50%, #7D8591), color-stop(100%, #535C69));
border-radius: 10px;
background-color: #9199A4;