Skip to content

Instantly share code, notes, and snippets.

View DanielleSucher's full-sized avatar

Danielle Sucher DanielleSucher

View GitHub Profile
Adventure Capitalists - WFH (these are friends of mine :)
Anne Prather - Hanrahan's Bar
Arrogant Worms - William Shakespeare's In My Cat
Blind Guardian - Lord of the Rings
Bob Kanefsky - The Eternal Flame (God Wrote in Lisp)
Cecilia Eng - Advice to Would-Be Heroes
Cynthia McQuillin - Apollo Lost
Doug Olsen - Fire in the Sky
Da Vinvi's Notebook - Title of the Song
Dr. Demento - Drunk Scottsman, Fishheads (you've probably heard this stuff already)
````.................-------::::-`
`.-:/+ossyhhddmmmmmmmmmmmmmmdddddddddddddddddddddmmy:
`-/oydmmmmmdyso++/::-:::///////:::::::---.`````````````./hmh/
-/ydmdhyso+++//:------:---.`````` ````.:::-. `-ymh-
.+hmds/.:/:-------..````...------:::::::::::::--.```-//- :dm+
-ymds:` `-```````....------..````` `..------..`.://:.`-+/- .hms`
omd+` `----------.` ::......--://:::-/+/.`-/-` `yNy`
oNy` :/:.``````...--` -o` `.-+/:-//- .-. `yNy`
@DanielleSucher
DanielleSucher / fe_vimrc.vim
Last active September 7, 2016 11:33
bits and pieces of feature explorer in vim
" An example of the sort of feature table I'm parsing here:
" https://github.com/janestreet/iron/blob/91210e6cbfb950b9da32429a42985a0cffcd0913/tests/test-todo-suppresses-next-steps-when-not-helpful.t#L76-L84
function! FeatureAtPoint()
" Save the starting position so we can return to it later.
let l:starting_pos = getpos('.')
" Initialize state for comparison.
let l:depth = 500
let l:path = []
@DanielleSucher
DanielleSucher / test.ml
Created July 21, 2016 01:59
just some ocamling around with fieldslib
open Core.Std
module A : sig
type t = {
foo : string;
bar : int
} [@@deriving fields]
end = struct
type t = {
foo : string;

In no particular order, some fiction I've loved:

  1. The Last Samurai by Helen DeWitt
  2. Vox and The Fermata by Nicholson Baker
  3. The Forgotten Beasts of Eld by Patricia McKillip
  4. The Cyberiad by Stanislaw Lem
  5. Winter's Tale by Mark Helprin
  6. Invisible Cities and Cosmicomics by Italo Calvino
  7. The Scar by China Mieville (And Perdido Street Station, natch. I also liked his The City and the City and Embassytown, but more as metaphorical tools than as stories)
  8. Rosencrantz and Guildenstern are Dead and Arcadia by Tom Stoppard
@DanielleSucher
DanielleSucher / regex_golf
Created December 25, 2013 02:18
Answers to the regex golf puzzles. These were actually pretty frustrating - inelegant solutions generally got better scores than elegant ones!
Regex Golf
http://regex.alf.nu/
My total score: 3569
Plain strings (205) - .*foo
Anchors (208) - k$
Ranges (202) - ^[a-f]+$
Backrefs (201) - (...).*\1
Abba (193) - ^(?!.*(.)(.)\2\1)
" inserts [#SID] into your commit message,
" assuming your branches follow the naming scheme: team_SID_description
function! InsertStoryId()
let sid_command = "mi" " mark current position
let sid_command = sid_command."\/On branch\<CR>" " move to line with branch name
let sid_command = sid_command."f_l" " move to first char of story #
let sid_command = sid_command."yt_" " yank the story #
let sid_command = sid_command."\/^#\<CR>ggn" " move to first #... line
let sid_command = sid_command."O" " add blank line in insert mode
safe(Pattern) when erlang:length(Pattern) > 80 ->
false;
safe(Pattern) ->
DangerousRegex = "\{-?[0-9]{3,}|[0-9]{3,}\\\\?\}|([^\\\\]|^)(\\\\\\\\)*/",
re:run(Pattern, DangerousRegex) =:= nomatch.
# username = "my_username"
# pwd = "my_password"
# target_path = "my_target_path"
# saving auth cookie
system %Q{wget --save-cookies /tmp/cookie.txt --keep-session-cookies --post-data "username=#{username}&password=#{pwd}" -O - \
https://rubytapas.dpdcart.com/subscriber/login?__dpd_cart=d08391e6-5fe2-4400-8b27-2dc17b413027}
(25..600).each do |i|
@DanielleSucher
DanielleSucher / benchmark_results.rb
Last active December 19, 2015 01:09
Case versus If in Ruby
n = 1 (last clause matches)
if: 7.4821e-07
threequal_if: 1.6830500000000001e-06
case: 3.9176999999999997e-07
n = 15 (first clause matches)
if: 3.7357000000000003e-07
threequal_if: 5.0263e-07
case: 4.3348e-07