Skip to content

Instantly share code, notes, and snippets.

@msridhar
msridhar / mergetex.pl
Created March 23, 2012 21:18
perl script for merging .tex files and BibTeX output into single .tex file
#!/usr/bin/perl
# mergetex.pl
#
# Script for merging tex files into a single monolithic file. This
# script should make it easy to generate an ArXiV-friendly single
# .tex file from a paper that is broken into subfiles using LaTeX's
# \input{} command.
#
# USAGE:
@larrytheliquid
larrytheliquid / gist:3890780
Created October 15, 2012 04:10
IR DT Types + Terms
open import Level
open import Data.Product public using ( Σ ; _,_ ; proj₁ ; proj₂ )
data ⊥ {a} : Set a where
! : ∀ {a b} {A : Set a} → ⊥ {b} → A
! ()
record ⊤ {a} : Set a where
constructor tt
@tkellogg
tkellogg / gist:5619461
Created May 21, 2013 12:33
How I installed mono 3 and monodevelop 4 on Ubuntu 13.04 with NuGet and F# support
# Add this line to your software sources
deb http://debian.meebey.net/experimental/mono /
sudo apt-get update
# of course, apt-get remove mono-complete first...
sudo apt-get install mono-complete
# I installed monodevelop from apt just to get all the prereqs
sudo apt-get install monodevelop

Basic

  • Don't try "unprivileged" build from start.
    • First do cross-dirs/cross-tools/cross-distrib as root (sudo).
    • Then change owner/mode of obj directories. This will make development easier.
  • Always use cross build (for development).
    • Otherwise you'll overwrite your /usr/include during build.
    • Cross build can't make release on OpenBSD, unfortunately (because of gnu/, where Makefile.bsd-wrapper is used). So cross build is only for development.
I like Learn You a Haskell as a reference and cheat-sheet but I found it a little slow for learning Haskell.
Here's my recommended order for just learning Haskell:
http://yannesposito.com/Scratch/en/blog/Haskell-the-Hard-Way/ 80% completion here is fine if you feel your attention waning, the next thing will address hammering in things like functors and monads via typeclasses.
https://github.com/NICTA/course/ this will hammer in the lessons in a very direct form by forcing you to confront the challenges and lessons learned by the creators and community of Haskell itself. Doing the exercises here is critical for being fluent.
Real World Haskell is available online. (Thanks bos!)
@myusuf3
myusuf3 / delete_git_submodule.md
Created November 3, 2014 17:36
How effectively delete a git submodule.

To remove a submodule you need to:

  • Delete the relevant section from the .gitmodules file.
  • Stage the .gitmodules changes git add .gitmodules
  • Delete the relevant section from .git/config.
  • Run git rm --cached path_to_submodule (no trailing slash).
  • Run rm -rf .git/modules/path_to_submodule (no trailing slash).
  • Commit git commit -m "Removed submodule "
  • Delete the now untracked submodule files rm -rf path_to_submodule
@paulochf
paulochf / ipython_notebook_large_width.py
Last active September 22, 2022 22:22
IPython/Jupyter Notebook enlarge/change cell width
from IPython.display import display, HTML
display(HTML(data="""
<style>
div#notebook-container { width: 95%; }
div#menubar-container { width: 65%; }
div#maintoolbar-container { width: 99%; }
</style>
"""))
@lambdageek
lambdageek / Array-In-InferRule.md
Last active February 27, 2023 17:33
LaTeX array within inferrule from mathpartir

Sometimes I want to put an array inside of a mathpartir inferrule.

The straightforward thing doesn't work:

\begin{equation*}
\inferrule{Conclusion}{
  Premiss 1 \and
  \begin{array}{ll}
 1 &amp; 2 \\ % note, this is where the problem happens
@tanb
tanb / xhyve-freebsd-tutorial-1.md
Last active November 27, 2021 13:07
FreeBSD running on xhyve tutorial. (Appendix: Resize image with qemu. Create FreeBSD VM with qemu).

TL;DR

  • Create 5GB FreeBSD image.
  • Install FreeBSD on xhyve.
  • Mount host directory.

Requisites

@amyjko
amyjko / cer.md
Last active December 16, 2020 19:14