Skip to content

Instantly share code, notes, and snippets.

👊
omae wa mou shindeiru

Austin Seipp thoughtpolice

👊
omae wa mou shindeiru
Block or report user

Report or block thoughtpolice

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@kwf
kwf / pretty-pragmata.el
Last active Jan 11, 2020
Mappings for prettify-symbols-mode to enable Pragmata Pro's ligatures in Emacs. I've taken some slight liberties with the original ligature map, to suit my own tastes.
View pretty-pragmata.el
;; PRETTIFY SYMBOLS (with Pragmata Pro)
(defun setup-pragmata-ligatures ()
(setq prettify-symbols-alist
(append prettify-symbols-alist
'(("!!" . ?)
("!=" . ?)
("!==" . ?)
("!≡" . ?)
("!≡≡" . ?)
("!>" . ?)
View nix-multi.md

Multi user nix installation

Each section should be run as the user or as root, pay attention to which one!

Install nix single user

As $USER

curl https://nixos.org/nix/install | sh
@postmodern
postmodern / comment.md
Last active Jan 1, 2020
Crypto Privacy Copy Pasta
View comment.md
@thoughtpolice
thoughtpolice / bound.hs
Created Dec 30, 2012
de Bruijn indicies that don't suck
View bound.hs
import Data.List
import Data.Foldable
import Data.Traversable
import Control.Applicative
import Control.Monad (ap)
import Prelude.Extras
import Bound
@thoughtpolice
thoughtpolice / algebras.hs
Last active Dec 10, 2015
Initial algebras and final coalgebras
View algebras.hs
{-# LANGUAGE RankNTypes, DeriveFunctor #-}
{-# LANGUAGE FlexibleInstances, TypeSynonymInstances #-}
module Main where
import Criterion.Main (defaultMain, bench, bgroup, nf)
--------------------------------------------------------------------------------
-- Fixed points of a functor
newtype Mu f = Mu { muF :: f (Mu f) }
View intern.hs
{-# LANGUAGE CPP #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE FlexibleInstances #-}
module Intern where
import GHC.Generics (Generic)
import Data.Function (on)
import Data.Hashable
@wlangstroth
wlangstroth / deploy.rb
Last active Oct 11, 2019
Capistrano + Nginx + Unicorn + Sinatra on Ubuntu
View deploy.rb
require 'bundler/capistrano'
set :application, "net"
set :repository, "git@githost.com:net.git"
set :scm, :git
set :default_environment, {
'PATH' => "$HOME/.rbenv/shims:$HOME/.rbenv/bin:$PATH"
}
@thoughtpolice
thoughtpolice / Codensity.hs
Created Sep 12, 2012
Codensity transformation, problem set, solutions, notes, and other stuff
View Codensity.hs
-- Inspired by the writings of Edward Kmett, Edward Yang and Gabriel Gonzalez
-- concerning free monads and the codensity transformation.
--
-- http://comonad.com/reader/2011/free-monads-for-less/
-- http://blog.ezyang.com/2012/01/problem-set-the-codensity-transformation/
-- http://www.haskellforall.com/2012/06/you-could-have-invented-free-monads.html
--
{-# LANGUAGE RankNTypes #-}
{-# LANGUAGE MultiParamTypeClasses #-}
{-# LANGUAGE FlexibleInstances #-}
@piscisaureus
piscisaureus / pr.md
Created Aug 13, 2012
Checkout github pull requests locally
View pr.md

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:

You can’t perform that action at this time.