Skip to content

Instantly share code, notes, and snippets.

View enocom's full-sized avatar

Eno Compton enocom

View GitHub Profile
@stuartsierra
stuartsierra / errors.clj
Created April 20, 2012 14:27
Example error messages from common mistakes with Datomic
;; Some example error messages resulting from common mistakes
;; using Datomic 0.8.4138
(ns errors
(:use [datomic.api :as d :only (db q)]))
(def uri "datomic:mem://database")
(d/create-database uri)
@MohamedAlaa
MohamedAlaa / tmux-cheatsheet.markdown
Last active November 19, 2024 10:49
tmux shortcuts & cheatsheet

tmux shortcuts & cheatsheet

start new:

tmux

start new with session name:

tmux new -s myname
@rody
rody / gist:2996363
Created June 26, 2012 15:13
Better log format in Git (Colorblind proof) and a nice bash prompt
Git log :
git log --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit
Bash prompt
export PS1'=\[\033[01;32m\]\u@\h\[\033[01;34m\] \w\[\033[01;33m\]$(__git_ps1)\[\033[01;34m\] \$\[\033[00m\] '
@tetsuok
tetsuok / .gdbinit
Created June 30, 2012 20:16
Turning off optimization and inlining in Go gc compilers for debugging.
source /usr/local/go/src/pkg/runtime/runtime-gdb.py
b main.main
@adamwiggins
adamwiggins / adams-heroku-values.md
Last active November 5, 2024 21:40
My Heroku values

Make it real

Ideas are cheap. Make a prototype, sketch a CLI session, draw a wireframe. Discuss around concrete examples, not hand-waving abstractions. Don't say you did something, provide a URL that proves it.

Ship it

Nothing is real until it's being used by a real user. This doesn't mean you make a prototype in the morning and blog about it in the evening. It means you find one person you believe your product will help and try to get them to use it.

Do it with style

@staltz
staltz / introrx.md
Last active November 19, 2024 18:00
The introduction to Reactive Programming you've been missing
@nelsam
nelsam / pacman.b
Last active November 11, 2023 15:20
WHY??? WHY DID I DO THIS?
++++++++++++++++
++++++++++++++++++++++++++++
+++++++++++++++++++++++++++++++++++++
++++++++++++++++++++++++++++++++++++++.>+++
+++++++++++++++++++++++++++++++++++++++++++++++++
+++++++++++++++++++++++++++++++++++++++++++++.>++++++
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++
++++++++++++++++++++++++++++++++++++++++++++.>+++++++++++++
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+++++++++++++++++++++.>++++++++++++++++++++++++++++++++.>++++++++
package main
import "fmt"
type T struct{}
func (t T) Method() {
fmt.Println("Hey there")
}

Type Safe JSON Decoding in Elm

The power of a Static Typed language can seem magical at first. But the goal here is to take a tiny peak behind that curtain.

Elm's implementation of JSON parsing is type safe and how it achieves that can seem like a mystery. Even though I got the code to work, it took me a while to fully understand how it works.

I'm writing it down here for 2 reasons. To help others gain a greater understanding of Types and so I don't forget what I learned.

Word of Caution

@posener
posener / go-shebang-story.md
Last active October 18, 2024 01:42
Story: Writing Scripts with Go

Story: Writing Scripts with Go

This is a story about how I tried to use Go for scripting. In this story, I’ll discuss the need for a Go script, how we would expect it to behave and the possible implementations; During the discussion I’ll deep dive to scripts, shells, and shebangs. Finally, we’ll discuss solutions that will make Go scripts work.

Why Go is good for scripting?

While python and bash are popular scripting languages, C, C++ and Java are not used for scripts at all, and some languages are somewhere in between.