Skip to content

Instantly share code, notes, and snippets.

@elberskirch
elberskirch / garmin to tcx conversion
Last active April 5, 2016 22:12
oneliner converts all gmn file in a directory to tcx
for i in $(basename -s .gmn `ls *.gmn` ); do ../../garmin-dev/gmn2tcx $i.gmn > $i.tcx; done
@elberskirch
elberskirch / jekyll-deployment.md
Last active January 16, 2019 03:06
Capistrano deployment for jekyll

introduction

This is a short rundown for setting up deployment for a jekyll blog using a self-hosted git repository and a vserver running nginx. Deployment is done with capistrano (version 3).

Github is probably the most common and most convenient way to host your code for your jekyll blog, but sometimes you might want to keep everything under your own control or you're just curious what barebones git does for you.

setting up the git repository

For setting up a git repository on a linux machine I used this guide. A short wrapup:

  • add a git user
@elberskirch
elberskirch / rubygame_challenge_#1.rb
Created December 27, 2011 15:33
Rubygame Challenge #1 solution
#!/usr/bin/env ruby
# see http://www.therubygame.com/challenges/1/submissions for task
# input string: ABCDEFGHIJKLMNOPQRSTUVWXY
# output string: ABCDE-FGHIJ-KLMNO-PQRST-UVWXY
def generate_licence_key(q)
a = []
5.times do
a.push q.slice!(0,5)
end
#!/usr/bin/env ruby
# Query vogelisms.com to collect quotes
require 'rubygems'
require 'open-uri'
require 'nokogiri'
if ARGV.empty?
puts "vogelisms.rb [number]"
puts "Scrapes vogelisms.com [number] of times -> [number] of quotes"
puts "No check for double quotes"