Skip to content

Instantly share code, notes, and snippets.

# * grab a Gogh color scheme from https://raw.githubusercontent.com/Gogh-Co/Gogh/master/data/themes.json
# * split up into the `colors` and the `fbc` variable (check that the keys are
# in the same order!)
# * run this script (`elixir gogh_scheme_to_tilda_config.exs`)
colors = ~s{
"black": "#000000",
"red": "#C75646",
"green": "#8EB33B",
"yellow": "#D0B03C",
@schnittchen
schnittchen / vim_survival_cheat.md
Last active November 10, 2018 12:50
VIM survival and beyond cheatsheet

VIM survival and beyond cheatsheet

To brush up beginner knowledge: run vimtutor

Bare minimum

a.k.a. I hate vim but I'm forced to use it:

Everything here starts in "normal mode"!

## There are dependencies we cannot see, e.g. when a task
## invokes another one programmatically
# find all tasks for which we provide an action
tasks1 = Rake.application.tasks.select { |task|
task.actions.any?
}.reject { |task|
task.actions.first.source_location.first["/gems"]
}
#!/bin/bash
# Touches changed files in order to make it work
# when filesystem changes are not properly detected
# by development mode code reloading.
#
# Usage: bin/touch_changed [<sleep every>]
EVERY=${1:-1}
module TwoCounters exposing (init, update, view)
import Html exposing (..)
import Html.App exposing (..)
import Counter exposing (Model, init, update, view)
type Slot = Top | Bottom
type alias Model = Slot -> Counter.Model
#!/bin/bash
# Modified to send email instead. Original copyright message below:
# Cronic v2 - cron job report wrapper
# Copyright 2007 Chuck Houpt. No rights reserved, whatsoever.
# Public Domain CC0: http://creativecommons.org/publicdomain/zero/1.0/
set -eu
#!/bin/bash
source ~/.bash_profile
set -e
set -x
if [ -f ~/evm ]; then
echo evm found
else
@schnittchen
schnittchen / German-Zip-Codes.csv
Last active August 29, 2015 14:25 — forked from jbspeakr/German-Zip-Codes.csv
list of German zip codes (Postleitzahl), including dialing code, name of the city and federal state.
We can't make this file beautiful and searchable because it's too large.
Ort;Zusatz;Plz;Vorwahl;Bundesland
Aach;b Trier;54298;0651;Rheinland-Pfalz
Aach;, Hegau;78267;07774;Baden-Württemberg
Aachen;;52062;0241;Nordrhein-Westfalen
Aachen;;52064;0241;Nordrhein-Westfalen
Aachen;;52066;0241;Nordrhein-Westfalen
Aachen;;52068;0241;Nordrhein-Westfalen
Aachen;;52070;0241;Nordrhein-Westfalen
Aachen;;52072;0241;Nordrhein-Westfalen
Aachen;;52074;0241;Nordrhein-Westfalen
# jsxlint does not consider files not ending in .jsx as containing JSX syntax.
# With react-rails, a .jsx file is not subject to 6to5/babel transformation,
# hence I cannot use JSX syntax and ES6 at the same time.
# This little hack (and a little convention) does the trick for me:
#
# The sprockets-es6 gem provides both transformations I want for the .es6 ending.
# I name my files ending in .es6.jsx (which happens to be descriptive as well)
# and make the .jsx transformation step a NOP (by overwriting the engine
# which has been registered for .jsx before by react-rails).
@schnittchen
schnittchen / gist:2b765d2c03063e8c49ad
Created January 13, 2015 11:22
Rust beginners resources
Intended at programmers, not absolute beginners.
Consume these resources in this order to get the hang of Rust:
1) for motivation and the basic resource management notions https://d3fenhwk93s16g.cloudfront.net/0l7u7x/mp4.mp4?t=142109848354b43df3bf31f
2) for a tour of the language features and to get a grip on the syntax http://rustbyexample.com/
3) go more into depth http://doc.rust-lang.org/book/
Work in progress. Suggestions welcome!