Skip to content

Instantly share code, notes, and snippets.

View Koronen's full-sized avatar

Victor Koronen Koronen

View GitHub Profile
@Koronen
Koronen / 20-thinkpad.conf
Last active January 7, 2020 20:04
Thinkpad X220 tweaks
# /usr/share/X11/xorg.conf.d/20-thinkpad.conf
Section "InputClass"
Identifier "Trackpoint Wheel Emulation"
MatchProduct "TPPS/2 IBM TrackPoint|DualPoint Stick|Synaptics Inc. Composite TouchPad / TrackPoint|ThinkPad USB Keyboard with TrackPoint|ThinkPad Compact USB Keyboard with TrackPoint|USB Trackpoint pointing device"
MatchDevicePath "/dev/input/event*"
Option "EmulateWheel" "true"
Option "EmulateWheelButton" "2"
Option "Emulate3Buttons" "false"
Option "XAxisMapping" "6 7"
Option "YAxisMapping" "4 5"
@Koronen
Koronen / Dockerfile
Created April 4, 2015 16:15
WIP: Elixir on Debian Jessie
FROM debian:jessie
MAINTAINER Victor Koronen <[email protected]>
ENV DEBIAN_FRONTEND noninteractive
RUN apt-get update
RUN apt-get install -y wget git build-essential
RUN wget http://packages.erlang-solutions.com/erlang-solutions_1.0_all.deb
RUN dpkg -i erlang-solutions_1.0_all.deb
@Koronen
Koronen / bin_setup.sh
Last active August 29, 2015 14:13
Add missing keys from .env.sample to .env
#!/usr/bin/env sh
set -e
if [ ! -f .env ]; then
cp .env.sample .env
fi
present_keys=$(grep -v "^#" .env | cut -d= -f1)
missing_keys=$(grep -v "^#" .env.sample | cut -d= -f1 | grep -Fvx "$present_keys" || true)
@Koronen
Koronen / gist:723eabff8d3c68338a21
Created November 4, 2014 09:29
thoughtbot/hound test failure 2014-11-04
koronen@paridae$ git fetch upstream
koronen@paridae$ git checkout upstream/master
Note: checking out 'upstream/master'.
You are in 'detached HEAD' state. You can look around, make experimental
changes and commit them, and you can discard any commits you make in this
state without impacting any branches by performing another checkout.
If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -b with the checkout command again. Example:
-----> Writing config/database.yml to read from DATABASE_URL
Could not detect rake tasks
ensure you can run `$ bundle exec rake -P` against your app with no environment variables present
and using the production group of your Gemfile.
This may be intentional, if you expected rake tasks to be run
cancel the build (CTRL+C) and fix the error then commit the fix:
rake aborted!
Bad file descriptor - /tmp/build_dc277ba7-f4e3-427e-b521-0a4936c2c7a2/vendor/bundle/ruby/2.0.0/gems/backports-3.3.5/lib/backports/1.9.1/io/open.rb
/tmp/build_dc277ba7-f4e3-427e-b521-0a4936c2c7a2/vendor/bundle/ruby/2.0.0/gems/backports-3.3.5/lib/backports/1.9.1/io/open.rb:2:in `close'
/tmp/build_dc277ba7-f4e3-427e-b521-0a4936c2c7a2/vendor/bundle/ruby/2.0.0/gems/backports-3.3.5/lib/backports/1.9.1/io/open.rb:2:in `open'
#!/bin/bash
# Written by: Victor Koronen <[email protected]>
# Based on: https://github.com/RGBboy/mongodb-s3-backup
# Dependencies: s3cmd (http://s3tools.org)
set -e
if [[ $# < 1 ]] ; then
echo "Usage: $0 S3_URL"
exit 1
@Koronen
Koronen / Gemfile
Last active August 29, 2015 14:04
Mongoid 3.1.6 update_attributes gotcha
gem 'mongoid', '3.1.6'
@Koronen
Koronen / Gemfile
Last active February 27, 2016 10:45
RailsCasts downloader
source 'https://rubygems.org'
ruby '2.1.0'
gem 'dotenv', '~> 0.11.1'
gem 'mechanize', '~> 2.7.3'
gem 'nokogiri', '~> 1.6.2'
@Koronen
Koronen / .gitignore
Last active February 27, 2016 10:45
CoffeeLint Hound
node_modules/
@Koronen
Koronen / kthsnittet.rb
Last active February 27, 2016 10:50
KTH-snittet
require 'bundler/inline'
gemfile(true) do
source 'https://rubygems.org'
gem 'nokogiri', '~> 1.6'
end
require 'csv'
require 'date'