Skip to content

Instantly share code, notes, and snippets.

Daniel Santa Cruz dstcruz

Block or report user

Report or block dstcruz

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
@dstcruz
dstcruz / purescript.nix
Last active Sep 11, 2019
An overlay for misc purescript tools/toys
View purescript.nix
self: super:
let
patchelf = libPath: if self.stdenv.isDarwin
then ""
else ''
chmod u+w $SPAGO
patchelf --interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" --set-rpath ${libPath} $SPAGO
chmod u-w $SPAGO
'';
View keybase.md

Keybase proof

I hereby claim:

  • I am dstcruz on github.
  • I am dstcruz (https://keybase.io/dstcruz) on keybase.
  • I have a public key whose fingerprint is CA82 9C6D 8251 FEC4 8AA6 9E5F 7027 5898 2A82 9428

To claim this, I am signing this object:

View init.el
;; dansan's basic emacs configuration
;; for emacs 24
(setq default-mayor-mode 'text-mode)
(setq make-backup-files nil)
(setq auto-save-default nil)
(setq inhibit-splash-screen t)
(setq inhibit-startup-message t)
(setq scroll-set 1 scroll-conservatively 10000)
@dstcruz
dstcruz / Hack.hs
Created Mar 29, 2013
First draft of an assembler for the Hack machine ("From NAND to Tetris" fame). This does not have any good error handling, and, as you can see, there are no comments.
View Hack.hs
{-
Known to work with:
The Glorious Glasgow Haskell Compilation System, version 7.4.2
Extra library dependency:
Safe
To compile:
ghc -o HackAssembler Hack.hs
@dstcruz
dstcruz / gist:4047355
Created Nov 9, 2012
Nice to use with haskell :)
View gist:4047355
(defun my-align-single-equals ()
"Align on a single equals sign (with a space either side)."
(interactive)
(align-regexp
(region-beginning) (region-end)
"\\(\\s-*\\) = " 1 0 nil))
(global-set-key (kbd "C-c a") 'my-align-single-equals)
You can’t perform that action at this time.