Skip to content

Instantly share code, notes, and snippets.

View lukasvermeer's full-sized avatar

Lukas Vermeer lukasvermeer

View GitHub Profile
@lukasvermeer
lukasvermeer / Example Output
Last active August 29, 2015 14:12
Johan envisioned a Twitter bot that introduces people who say "X, said no one ever" to people who've said X. Here's a start.
Max:Said No One Ever lukas$ date && python ___SNOE.py
Thu Dec 25 13:50:35 CET 2014
---
@ezafar3 Tweeted: "Awesome weather today #SaidNoOneEver"
- http://twitter.com/ezafar3/status/548089419648208896
@BrittanyRiitano Said: "Melbourne definitely delivered the awesome weather today for chrissy!"
- http://twitter.com/BrittanyRiitano/status/548012278457446400
---
@ezafar3 Tweeted: "Awesome weather today #SaidNoOneEver"
- http://twitter.com/ezafar3/status/548089419648208896
@lukasvermeer
lukasvermeer / add_one_letter.pl
Last active December 28, 2015 21:19
Quick and dirty hack to find alternative sentences that can be created by adding a single letter to an input sentence. Probably only works on Mac (because it expects a dictionary file in a specific place).
use strict;
use warnings;
die "Malfunction. Need input." unless $ARGV[0];
open(W, "/usr/share/dict/words");
my @w;
while (my $line = <W>) {
chomp($line);
push(@w, lc($line));
@lukasvermeer
lukasvermeer / gist:5070529
Created March 2, 2013 11:01
Find words for the game 4 Pics 1 Word. Takes a bunch of letters ("elnopq" in this case) and prints four letter words that can be formed using a subset of those letters.
perl -ne 'if((join "",sort split(//,lc))=~/^\s*e?l?n?o?p?q?$/&$_=~/^\w{4}$/){print $_};' /usr/share/dict/words