Skip to content

Instantly share code, notes, and snippets.

View ajnsit's full-sized avatar
🚕
Places to go, things to do

Anupam <|> अनुपम ajnsit

🚕
Places to go, things to do
View GitHub Profile
@piscisaureus
piscisaureus / pr.md
Created August 13, 2012 16:12
Checkout github pull requests locally

Locate the section for your github remote in the .git/config file. It looks like this:

[remote "origin"]
	fetch = +refs/heads/*:refs/remotes/origin/*
	url = git@github.com:joyent/node.git

Now add the line fetch = +refs/pull/*/head:refs/remotes/origin/pr/* to this section. Obviously, change the github url to match your project's URL. It ends up looking like this:

@puffnfresh
puffnfresh / non-strict-vs-strict.md
Last active January 4, 2016 04:59
Comparison of lazy vs strict Free

Free in Haskell:

data Free f a = Return a
              | Suspend (f (Free f a))

Free in a strict language:

@lucabrunox
lucabrunox / autotools.nix
Last active December 19, 2018 02:38
Nix pill 10
pkgs: attrs:
with pkgs;
let defaultAttrs = {
builder = "${bash}/bin/bash";
args = [ ./builder.sh ];
setup = ./setup.sh;
baseInputs = [ gnutar gzip gnumake gcc binutils coreutils gawk gnused gnugrep patchelf findutils ];
buildInputs = [];
system = builtins.currentSystem;
};
@nkpart
nkpart / Yolo.hs
Last active September 5, 2018 13:50
{-# LANGUAGE GADTs #-}
module Yolo where
import System.IO.Unsafe
class Yolo f where
yolo :: f a -> a
instance Yolo Maybe where
yolo (Just x) = x
--==============================
-- Send Keynote Text to Desktop Markdown File
-- Writted By: Richard Dooling https://github.com/RichardDooling/
-- Based on
-- Send Keynote Presenter Notes to Evernote
-- Version 1.0.1
-- Written By: Ben Waldie <ben@automatedworkflows.com>
-- http://www.automatedworkflows.com
-- Version 1.0.0 - Initial release
@chrisdone
chrisdone / typing.md
Last active May 9, 2024 15:27
Typing Haskell in Haskell

Typing Haskell in Haskell

MARK P. JONES

Pacific Software Research Center

Department of Computer Science and Engineering

Oregon Graduate Institute of Science and Technology

@agocorona
agocorona / cordova.hs
Last active September 25, 2015 16:31
--
-- Hello-World of the cordova/phonegap application using Haskell.
--
-- here is the screenshoot
--
-- https://twitter.com/AGoCorona/status/532948528621178880
--
-- So that Haste-Haskell can be used to create hybrid smartphone applications
--
-- The original cordova JavaScript hello world is installed following the instructions of this page
@thunklife
thunklife / packages.el
Created July 6, 2015 21:33
elm-mode for Spacemacs
;;; packages.el --- elm Layer packages File for Spacemacs
;;
;; Copyright (c) 2012-2014 Sylvain Benner
;; Copyright (c) 2014-2015 Sylvain Benner & Contributors
;;
;; Author: Sylvain Benner <sylvain.benner@gmail.com>
;; URL: https://github.com/syl20bnr/spacemacs
;;
;; This file is not part of GNU Emacs.
;;
@gallais
gallais / MatchFree.hs
Created July 14, 2015 20:09
Match on the Church-encoded Free Monad
{-# LANGUAGE Rank2Types #-}
module MatchFree where
newtype F f a = F { runF :: forall r. (a -> r) -> (f r -> r) -> r }
pureF :: a -> F f a
pureF a = F $ const . ($ a)
freeF :: Functor f => f (F f a) -> F f a