Skip to content

Instantly share code, notes, and snippets.

View tomekw's full-sized avatar
🥇
🏅

Tomek Wałkuski tomekw

🥇
🏅
View GitHub Profile
@tomekw
tomekw / gist:37a08efb8204cce22afd
Created October 8, 2014 12:52
Change JDK version
function setjdk() {
if [ $# -ne 0 ]; then
removeFromPath '/System/Library/Frameworks/JavaVM.framework/Home/bin'
if [ -n "${JAVA_HOME+x}" ]; then
removeFromPath $JAVA_HOME
fi
export JAVA_HOME=`/usr/libexec/java_home -v $@`
export PATH=$JAVA_HOME/bin:$PATH
fi
}
@tomekw
tomekw / database.yml
Created May 27, 2015 10:33
database.yml with URL
development:
url: <%= ENV["DATABASE_DEV_URL"] %>
test:
url: <%= ENV["DATABASE_TEST_URL"] %>
production:
url: <%= ENV["DATABASE_URL"] %>
@tomekw
tomekw / gist:a6289a71f0ee6d31cf3a
Created May 28, 2015 14:29
Pieniądze są dobre
Ksiądz jest bogaty?
- Nie wiem, jak odpowiedzieć na to pytanie. Kiedyś byłem w telewizji, ponieważ skandalem było to, jakie samochody mają księża. Naprzeciwko mnie był Andrzej Rozenek, którego zapytałem, czy jest katolikiem, bo jeśli nie, to co go interesują samochody księży? Żyjemy w wolnym kraju, każdy ma taki samochód, jaki chce.
Tak więc ja, proszę pana, mam audi z 2000 roku. Jestem więc bogaty czy nie jestem?
Coś jeszcze ksiądz posiada?
- Sprzęt do wspinaczki i trzy rowery. Miejski, o który nie muszę się martwić, że mi ukradną, szosowy i do jeżdżenia po lesie. No bo jako że już nie mogę tak dużo chodzić po górach, to na rowerze sobie jeżdżę.
@tomekw
tomekw / zshrc
Created May 30, 2012 07:39
Efficient Heroku (ZSH version)
function h { heroku $argv[0,-2] --app $argv[-1] }
function hp { h $argv production_app_name }
function hs { h $argv staging_app_name }
alias hpc="hp run console"
alias hsc="hs run console"
alias hpl="hp logs -t"
alias hsl="hs logs -t"

Dockerfile

FROM ruby:2.3.1-alpine

RUN apk --update --no-cache add build-base imagemagick less libxml2-dev libxslt-dev postgresql-dev && mkdir -p /app

WORKDIR /app

COPY Gemfile Gemfile.lock ./
@tomekw
tomekw / Readme
Created October 6, 2015 13:40 — forked from pointlessone/Readme
Rubocop pre-commit check
# Installation
Put these files in your `.git/hooks` directory and make them executable.
# Changelog
## 1.2
* Check for RuboCop updates
@tomekw
tomekw / the-programming-language-i-want.md
Created September 12, 2016 08:24
The programming language I want
  • statically-typed
  • strongly-typed
  • only one way to do one thing
  • no "syntax shortcuts" (cryptic operators, etc.)
  • immutability (value "classes", collections)
  • pattern matching
  • higher-order functions
  • readable syntax (lisp-case a.k.a. kebab-case indentifiers, do...end, def, etc.)
  • no need for an IDE
  • native binaries (optionally statically-linked)
@tomekw
tomekw / bubblebabble_ruby
Created September 21, 2016 09:28
Whiskey Tango Foxtrot
> require "digest/bubblebabble"
=> true
> Digest::SHA256.bubblebabble("_tomekw")
=> "xihag-nivyk-lucah-zekek-segyg-dimib-zeken-mepov-cilet-cegah-coteg-vipit-mybyg-cehor-kerec-gylyf-vaxux"

Keybase proof

I hereby claim:

  • I am tomekw on github.
  • I am tomekw (https://keybase.io/tomekw) on keybase.
  • I have a public key whose fingerprint is E3DF 760E C16C 936E B949 11C2 081B 19A1 2D4C 4A8E

To claim this, I am signing this object:

// file: src/test/kotlin/com/_98elements/CalculatorSpec.kt
package com._98elements
import org.junit.jupiter.api.Assertions.assertEquals
import org.junit.jupiter.api.assertThrows
import org.spekframework.spek2.Spek
import org.spekframework.spek2.style.specification.describe
object CalculatorSpec: Spek({