Skip to content

Instantly share code, notes, and snippets.

View torstello's full-sized avatar

Torsten Schmidt torstello

View GitHub Profile
@torstello
torstello / gist:9351040
Created March 4, 2014 17:16
17.Karmapa
At a recent event, His Holiness Karmapa Thaye Dorje was asked the following question:
'Your Holiness, what is stopping me from realizing my true nature, the Buddha nature?'
His Holiness' response:
'Perhaps it is a lack of a sense of adventure that is holding us back from realizing our true nature. It is easy to get used to the mundane life, the daily routines. As a result, we don't want to let go of our familiar atmosphere, the life that we are used to. We are missing a sense of adventure.
I think this is rooted in a deep fear: a fear of facing ourselves; a fear of knowing exactly who we are. It is almost like saying we fear looking at ourselves in the mirror and seeing our own reflections.
@torstello
torstello / gist:9219437
Created February 25, 2014 22:36
check_mk-oracle
# check_mk oracle
useradd checkmk
>> sqlplus / as sysdba;
SQL> create user ops$checkmk identified externally;
SQL> grant connect to ops$checkmk;
SQL> grant select on v_$session to ops$checkmk;
SQL> grant select on v_$loghist to ops$checkmk;
SQL> grant select any dictionary to ops$checkmk;
@torstello
torstello / gist:8577773
Created January 23, 2014 12:31
sublime::project-file
{ "folders":
[
{ "path": "/Users/ts/Documents/SOURCE/tmt",
"folder_exclude_patterns": ["doc", "tmt"]
}
],
"settings":
{
"tab_size": 2
}
@torstello
torstello / gist:8575607
Created January 23, 2014 09:30
ruby::logging
> I hate code like:
> logger.log(:debug, "some msg") unless logger.nil?
That is why my debugging or logging routines normally look like this
```
def logger *args
return unless $LOGGING
....
end
```
@torstello
torstello / git_like_bin
Created September 19, 2013 09:41
ruby::template: git-like-cli-bin
#!/usr/bin/env ruby
require 'gli'
begin # XXX: Remove this begin/rescue before distributing your app
require 'git_like_interface'
rescue LoadError
STDERR.puts "In development, you need to use `bundle exec bin/git_like_interface` to run your app"
STDERR.puts "At install-time, RubyGems will make sure lib, etc. are in the load path"
STDERR.puts "Feel free to remove this message from bin/git_like_interface now"
exit 64
end
@torstello
torstello / gist:6611610
Created September 18, 2013 16:18
test: foobar
Given /^the secret code is "([^"]*)"$/ do |secret|
game = Codebreaker::Game.new(output)
game.start(secret)
end
When /^I start a new game$/ do
game = Codebreaker::Game.new(output)
game.start
end
@torstello
torstello / gist:6583013
Created September 16, 2013 16:30
slim: starter template
doctype html
html
head
meta name="author" content=@author
link href="/css/reset.css" media="screen" rel="stylesheet" type="text/css"
link href="/css/grid.css" media="screen" rel="stylesheet" type="text/css"
link href="/css/layout.css" media="screen" rel="stylesheet" type="text/css"
link href="/css/text.css" media="screen" rel="stylesheet" type="text/css"
@torstello
torstello / gist:5099414
Created March 6, 2013 13:49
tips:sublimetext
## key repetition vintage-mode
http://www.sublimetext.com/docs/2/vintage.html
In OsX-Lion, holding down a key won't repeat it, but will instead show a popup menu to select between character variations. This doesn't work well with command mode, so you may want to disable it. This can be done via entering this at the terminal:
% defaults write com.sublimetext.[2|3] ApplePressAndHoldEnabled -bool false
SHORTCUTS:
curser in word or marked word:
ctrl-cmd-g --> select every occurence of that word
cmd-d --> select next occurence
@torstello
torstello / sequel-migration.sublime-snippet
Created February 28, 2013 13:50
snippet::ruby:sequel:migration
<snippet>
<content><![CDATA[
#Sequel.extension :migration
Sequel.migration do
change do
create_table(:${1:}) do
primary_key :id
${2:}
end
end