Skip to content

Instantly share code, notes, and snippets.

p DATA.read # => "wait what?\n"
__END__
wait what?
@tomasv
tomasv / gist:59f914e9c30be0c5b9b2
Last active August 29, 2015 14:05
Find a cross of zeroes in a sea of pluses.
(ns zero-island.core)
(def problem "+++0++\n++000+\n+++0++\n++++++")
(def ^:private value-encoding {\0 :zero \+ :plus})
(defn- split-lines [problem]
(clojure.string/split problem #"\s+"))
(defn- indexed-seq [s]
Company's quest for world domination has prompted us to open a convenience store - we sell only three products:
Product code | Name | Price
GR1 | Green tea | £3.11
SR1 | Strawberries | £5.00
CF1 | Coffee | £11.23
@tomasv
tomasv / profile
Last active August 29, 2015 14:15
function git-mode() {
alias gst='git status'
alias st='git status'
alias gco='git checkout'
alias co='git checkout'
alias gbr='git branch'
alias br='git branch'
alias gcommit='git commit'
alias commit='git commit'
alias gdiff='git diff'
@tomasv
tomasv / wunderdown.rb
Created October 21, 2015 19:52
Export all of your Wunderlist lists into simple Markdown checklists
#!/usr/bin/env ruby
#
# Usage: CLIENT_ID=a20f20 AUTH_TOKEN=a765q675dsf675 ruby wunderdown.rb
require 'json'
require 'restclient'
class Client
def initialize(client_id, access_token)
@access_token = access_token

Keybase proof

I hereby claim:

  • I am tomasv on github.
  • I am tomasv (https://keybase.io/tomasv) on keybase.
  • I have a public key ASChAlmmt1m19VwCPxhtBwTaHu7q3WSTL5FoW8J-GiCHUAo

To claim this, I am signing this object:

// ==UserScript==
// @name Github quick approve
// @version 5
// @grant none
// @match https://github.com/*
// @downloadURL https://gist.github.com/tomasv/68e6cb8940404ef0bd03b532766bb445/raw/github_quick_approve.user.js
// @updateURL https://gist.github.com/tomasv/68e6cb8940404ef0bd03b532766bb445/raw/github_quick_approve.user.js
// ==/UserScript==
let addButton = () => {