Skip to content

Instantly share code, notes, and snippets.

View nerdinand's full-sized avatar
💭
wat

Ferdinand Niedermann nerdinand

💭
wat
View GitHub Profile
#!/usr/bin/ruby
NAMES = %w{
Heinz
Ina
Ferdinand
Konstantin
Kaspar
Katalin
Leonie
@nerdinand
nerdinand / Main.elm
Last active January 27, 2016 00:13
Start of something to do with QR codes (Elm experiment)
import Svg exposing (..)
import Svg.Attributes exposing (..)
import Html exposing (Html)
type alias Pattern = List (List Int)
positionPattern : Pattern
positionPattern =
[
[1, 1, 1, 1, 1, 1, 1]
@nerdinand
nerdinand / rot13.rb
Last active December 29, 2015 14:43 — forked from rwoeber/rot13.rb
Ruby rot13
# or simply:
'foobar'.tr 'A-Za-z','N-ZA-Mn-za-m'
# rot(x)
class String
def rot(num = 13)
return self.split('').collect do|ch|
if /^[a-z]$/ === ch
((ch.ord + num - 'a'.ord) % 26 + 'a'.ord).chr
@nerdinand
nerdinand / de_CH.yml
Last active August 29, 2015 14:26
Rails de_CH (Swiss high german) locale
---
de:
date:
abbr_day_names:
- So
- Mo
- Di
- Mi
- Do
- Fr
require 'bundler'
Bundler.setup(:default)
require 'pg'
require_relative 'lib/active_record'
require 'minitest/autorun'
require 'logger'
require 'byebug'
require 'bundler'
Bundler.setup(:default)
require 'pg'
require_relative 'lib/active_record'
require 'minitest/autorun'
require 'logger'
require 'byebug'
ActiveRecord::Base.establish_connection(
:adapter => 'sqlite3',
:database => 'testing.db'
)
class Testing < ActiveRecord::Base
end
Testing.connection.create_table :testings do |t|
@nerdinand
nerdinand / keybase.md
Created November 28, 2014 11:33
keybase.md

Keybase proof

I hereby claim:

  • I am nerdinand on github.
  • I am nerdinand (https://keybase.io/nerdinand) on keybase.
  • I have a public key whose fingerprint is 7DEB BEB5 A188 D39C 5210 5C0C EE6D 8028 69DA B208

To claim this, I am signing this object:

I, [2014-09-15T17:06:07.484254 #70521] INFO -- : Registering connection 'joystick'...
I, [2014-09-15T17:06:07.484324 #70521] INFO -- : Registering device 'controller'...
I, [2014-09-15T17:06:07.484346 #70521] INFO -- : Preparing work...
I, [2014-09-15T17:06:07.485001 #70521] INFO -- : Initializing connection joystick...
I, [2014-09-15T17:06:07.490029 #70521] INFO -- : Initializing device controller...
E, [2014-09-15T17:06:07.629455 #70521] ERROR -- : Actor crashed!
LoadError: cannot load such file -- artoo/drivers/ouya
/Users/ferdi/.rbenv/versions/2.1.2/lib/ruby/2.1.0/rubygems/core_ext/kernel_require.rb:126:in `require'
/Users/ferdi/.rbenv/versions/2.1.2/lib/ruby/2.1.0/rubygems/core_ext/kernel_require.rb:126:in `require'
/Users/ferdi/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/artoo-1.8.0/lib/artoo/device.rb:121:in `require_driver'
@nerdinand
nerdinand / gist:9e8a86ad6b42f0527d89
Created September 12, 2014 06:51
OS X compilation errors
Scanning dependencies of target ontology_shared
[ 20%] Building CXX object ontology/CMakeFiles/ontology_shared.dir/src/Entity.cpp.o
In file included from /Users/ferdi/projects/ontology/ontology/src/Entity.cpp:8:
/Users/ferdi/projects/ontology/ontology/include/ontology/Entity.hpp:128:8: warning: extra tokens at end of #endif directive [-Wextra-tokens]
#endif / /__ONTOLOGY_ENTITY_HPP__
^
//
In file included from /Users/ferdi/projects/ontology/ontology/src/Entity.cpp:8:
In file included from /Users/ferdi/projects/ontology/ontology/include/ontology/Entity.hpp:12:
In file included from /Users/ferdi/projects/ontology/ontology/include/ontology/TypeContainers.hpp:14: