This simple force-directed graph shows character co-occurence in Les Misérables. A physical simulation of charged particles and springs places related characters in closer proximity, while unrelated characters are farther apart. Layout algorithm inspired by Tim Dwyer and Thomas Jakobsen. Data based on character coappearence in Victor Hugo's Les Misérables, compiled by Donald Knuth.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import re | |
import markdown2 | |
class CustomMarkdown(markdown2.Markdown): | |
""" | |
Custom markdown processor that we use for task list | |
""" | |
reTaskList = re.compile(''' | |
(?P<prefix>[\r\n|\n|\r]*) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(function() { | |
var links = document.querySelectorAll('.ogAggregationSubstorySlideHeadline > a'); | |
for( var i=0, len=links.length; i < len; i += 1) { | |
var url = links[i].getAttribute('href'); | |
url = decodeURIComponent(url.split("?")[1].split("&")[2].split("=")[1]); | |
links[i].setAttribute('href',url); | |
links[i].setAttribute('target','_blank'); | |
} | |
}()); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// Generating stronger PHP session IDs | |
// Change from default PHPSESSID | |
ini_set('session.name','my_cookie'); | |
// Use only cookies to prevent session ID hijacking | |
ini_set('session.use_cookies', 'true'); | |
ini_set('session.use_only_cookies', 'true'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// A few terminal commands to determine SSD, display manufacturer | |
// Display Manufacturer | |
ioreg -lw0 | grep \"EDID\" | sed "/[^<]*</s///" | xxd -p -r | strings -6 | |
LPXXXX = LG | |
LSNXXXX = Samsung | |
// SSD Manufacturer |
I hereby claim:
- I am Checksum on github.
- I am checksum (https://keybase.io/checksum) on keybase.
- I have a public key whose fingerprint is EEA1 CD10 320D 497A B440 F6BD 45DD 4E24 58A5 101A
To claim this, I am signing this object:
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require('http').request({ | |
host: 'example.com', | |
path: '/path/to/get', | |
method: 'GET' | |
}, function(res) { | |
res.setEncoding('utf8'); | |
var body = ''; | |
res.on('data', function(chunk) { | |
body += chunk; | |
}); |
- Clone
elm/compiler
- Install stack
- Install required version of cabal using
stack --resolver lts-9 install cabal-install
(commercialhaskell/stack#3453 (comment)) PATH=~/.local/bin:$PATH stack init --solver
to install the required version of GHCPATH=~/.local/bin:$PATH stack build --flag elm:dev
to build
-
Split every character:
"something".split(/(?!^)/)
-
Never split:
"something".split(/^.$/)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- type 'go' to execute the block | |
-- List all tables | |
1> select * from information_schema.tables; | |
-- Describe table | |
1> exec sp_columns table_name; |
OlderNewer