Skip to content

Instantly share code, notes, and snippets.

View neizod's full-sized avatar
📚
phd completed, seeking my new goal in life

Nattawut Phetmak neizod

📚
phd completed, seeking my new goal in life
View GitHub Profile
@140bytes
140bytes / LICENSE.txt
Created May 9, 2011 16:13
140byt.es -- Click ↑↑ fork ↑↑ to play!
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
Version 2, December 2004
Copyright (C) 2011 YOUR_NAME_HERE <YOUR_URL_HERE>
Everyone is permitted to copy and distribute verbatim or modified
copies of this license document, and changing it is allowed as long
as the name is changed.
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
@wrayal
wrayal / LICENSE.txt
Created May 30, 2011 10:01 — forked from 140bytes/LICENSE.txt
Fibonacci in 41 bytes
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
Version 2, December 2004
Copyright (C) 2011 YOUR_NAME_HERE <YOUR_URL_HERE>
Everyone is permitted to copy and distribute verbatim or modified
copies of this license document, and changing it is allowed as long
as the name is changed.
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
@p01
p01 / LICENSE.txt
Last active May 23, 2024 13:46 — forked from 140bytes/LICENSE.txt
Sudoku Solver in 140bytes
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
Version 2, December 2004
Copyright (C) 2011 Mathieu 'p01' Henri - http://www.p01.org/releases/
Everyone is permitted to copy and distribute verbatim or modified
copies of this license document, and changing it is allowed as long
as the name is changed.
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
@aconrad
aconrad / highlight.js
Created December 27, 2011 06:48
bootstrap syntax highlighting on blogger dynamic views
// Read instructions here: http://www.alexconrad.org/2011/12/highlight-code-with-bloggers-dynamic.html
(function() {
try {
prettyPrint();
} catch(e) {
var scriptId = 'prettyPrinter';
if (document.getElementById(scriptId) === null) {
var elem = document.createElement('SCRIPT');
elem.id = scriptId;
elem.onload = function() {
@Python1Liners
Python1Liners / LICENSE.txt
Created February 20, 2012 19:14 — forked from 140bytes/LICENSE.txt
Python 1-Liners -- Click ↑↑ fork ↑↑ to play!
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
Version 2, December 2004
Copyright (C) 2012 YOUR_NAME_HERE <YOUR_URL_HERE>
Everyone is permitted to copy and distribute verbatim or modified
copies of this license document, and changing it is allowed as long
as the name is changed.
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
@tundal45
tundal45 / unix_books.md
Created February 20, 2012 20:03
This is a list of UNIX books that one should have around to get better at UNIX. The initial list below is started with recommendations from [Avdi Grimm](twitter.com/avdi). The idea is to have more people recommend books that need to be added to the list.
@masak
masak / explanation.md
Last active June 13, 2024 20:05
How is git commit sha1 formed

Ok, I geeked out, and this is probably more information than you need. But it completely answers the question. Sorry. ☺

Locally, I'm at this commit:

$ git show
commit d6cd1e2bd19e03a81132a23b2025920577f84e37
Author: jnthn <jnthn@jnthn.net>
Date:   Sun Apr 15 16:35:03 2012 +0200

When I added FIRST/NEXT/LAST, it was idiomatic but not quite so fast. This makes it faster. Another little bit of masak++'s program.

@hmason
hmason / test.sh
Created August 21, 2012 22:01
Did you know that bash will reload a script *while it is executing*?!
#!/bin/bash
function addnext {
NUM=$1
sleep 1
echo HI $NUM
NUM=$(expr $NUM + 1)
echo addnext $NUM >> $0
}
@lukechampine
lukechampine / Y Combinator in Haskell.md
Last active May 20, 2024 14:56
Deriving the Y Combinator in Haskell

The Y Combinator

The Y Combinator is a classic lambda calculus construct that many people find baffling. Here's my attempt to explain it as clearly as possible (no promises!). Familiarity with Haskell syntax is assumed.

The problem we're trying to solve is how to write an anonymous function (a "lambda") that is recursive. Normally, if you want to write a recursive function, it looks like this:

fac n = if n == 0 then 1
        else n * fac (n-1)
@jefferymiller
jefferymiller / KeyMap.ini
Created September 13, 2015 21:45
KeyMap.ini for Pirates! to play with tenkeyless keyboards.
; Key mappings for Sid Meier's Pirates!
; Useful for tenkeyless keyboards.
; Install to ~\Documents\My Games\Sid Meier's Pirates!\
;
; Commands for ship battles
[Battle]
Pause_P = P
ChainShot_c = c ;Also Num7
GrapeShot_g = g ;Also Num1
RoundShot_r = r ;Also Num3