Skip to content

Instantly share code, notes, and snippets.

View julienXX's full-sized avatar

Julien Blanchard julienXX

View GitHub Profile
@raichoo
raichoo / gist:f1ecaff3a465bbbd797b
Created July 16, 2015 21:04
Comonad: Dual of a Monad
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE RebindableSyntax #-}
module Comonad where
import Prelude (Functor(..))
class Functor m => Monad m where
return :: a -> m a
join :: m (m a) -> m a
@jblanche
jblanche / gist:867786
Created March 13, 2011 01:54
AtelierJS
http://gmoeck.github.com/2011/03/10/sproutcore-mvc-vs-rails-mvc.html
https://github.com/suvajitgupta/Tasks
http://gtmetrix.com/
http://benchmarkjs.com/
http://www.charlesproxy.com/
http://mislav.uniqpath.com/2011/03/click-hijack/
http://bonsaiden.github.com/JavaScript-Garden/#intro
https://github.com/sstephenson/execjs
https://github.com/hagenburger/lemonade
http://paul.donnelly.org/2009/07/08/yql-and-jsonp-x/
@magnars
magnars / goto-line-with-feedback.el
Created August 8, 2012 06:42 — forked from joshwnj/goto-line-with-feedback.el
Emacs: Show line numbers temporarily, while prompting for the line number input
;; turn line numbers off by default
(global-linum-mode -1)
(defun goto-line-with-feedback (&optional line)
"Show line numbers temporarily, while prompting for the line number input"
(interactive "P")
(if line
(goto-line line)
(unwind-protect
(progn
@mark-cooper
mark-cooper / pragpub.pl
Created November 17, 2012 18:29
Download PragPub magazine
use URI;
use URI::URL;
use Web::Scraper;
use LWP::Simple;
my $pp = "http://pragprog.com/magazines";
my $ok = "epub";
my $mags = scraper {
process "span.link", "mags[]" => scraper {
@mbriggs
mbriggs / install-graphite
Created April 3, 2014 17:25
install graphite on mavericks
#!/usr/bin/env bash
# download and install xquartz https://xquartz.macosforge.org
# so deps
brew install cairo memcached
@michaelt
michaelt / weather.hs
Created May 17, 2015 16:46
weather.hs
{-# LANGUAGE OverloadedStrings #-}
module Main where
import System.Environment
import Data.Monoid
import Control.Monad
import Data.Aeson
import qualified Data.Text as T
import qualified Data.Text.IO as T
import Network.HTTP.Client
@danclien
danclien / Main.hs
Created February 10, 2015 18:56
Using Aeson without type classes.
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE QuasiQuotes #-}
{-
build-depends: base >=4.7 && <4.8
, aeson
, aeson-qq
, bytestring
, text
@rgaidot
rgaidot / compose-install.service
Created January 28, 2017 13:11
Docker Compose on CoreOS
[Unit]
Description=Docker Compose on CoreOS
After=docker.service
Requires=docker.service
[Service]
Type=oneshot
RemainAfterExit=yes
TimeoutStartSec=0
Some brief instructions on how to use Sprocket 2 in Rails to get CoffeeScript
powered JS and SASS powered CSS with YUI compression all via the magic of rack.
This stuff will be native in Rails 3.1 and the layout of the files on the
filesystem will be different but this guide will get you working with it
while we wait for all that to finalize.
Ignore the number prefixes on each file. This is just to ensure proper order in the Gist.
It's based on eric1234 gist https://gist.github.com/911003. ijust made it 3.1 compliant in terms of convention