Skip to content

Instantly share code, notes, and snippets.

// ==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 = () => {

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:

@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
@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'
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 / 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]
p DATA.read # => "wait what?\n"
__END__
wait what?
launch_super_query('foo', <<-SQL, <<-TEXT)
drop table user;
SQL
I'm so sorry.
TEXT
@tomasv
tomasv / velocity.patch
Created August 1, 2013 21:35
Add a very custom velocity counter to sprints in redmine backlogs plugin master backlog page.
diff --git a/app/models/rb_sprint.rb b/app/models/rb_sprint.rb
index 3bed08b..4ba4961 100644
--- a/app/models/rb_sprint.rb
+++ b/app/models/rb_sprint.rb
@@ -69,6 +69,24 @@ class RbSprint < Version
return stories.inject(0){|sum, story| sum + story.story_points.to_i}
end
+ def velocity
+ return unless project.present?
@tomasv
tomasv / rspec configuration
Created March 6, 2013 00:29
Spring + Rubymine
In shell:
export RUBYLIB=/path/to/RubyMine/rb/testing/patch/common:/path/to/RubyMine/rb/testing/patch/bdd
spring rspec spec/ # to launch spring server
In Rubymine:
Uncheck bundler
Select custom runner script as spring_rspec.rb
add same variable to environment variables:
RUBYLIB=/path/to/RubyMine/rb/testing/patch/common:/path/to/RubyMine/rb/testing/patch/bdd