This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Xcode Auto-Versioning | |
# | |
# Updates your Info.plist's CFBundleVersion with the current git tag and/or sha. | |
# | |
# based on https://github.com/elliottcable/xcode-git-versioner | |
# | |
# Usage: | |
# 1. Right-click the target you want to add the versioning phase to (usually the target that builds your app) | |
# 2. Select: Add -> New Build Phase -> New Run Script Build Phase | |
# 3. Specify /usr/bin/env ruby as the shell for the script |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
" Add this to the bottom of your ~/.vimrc to enable jst highlighting | |
au BufNewFile,BufRead *.jst set syntax=jst |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Mag. jur. Köger, 40 Jahre Finanzverwaltung | |
www.bmf.gv.at | |
- SelbständigenBuch | |
- Findok (Finanzdokumentation) | |
Mögliche Organisationsformen: | |
- Einzelfirma | |
- Personengesellschaft | |
Anfang keine bezahlten Angestellten, alle die hakln sind beteiligt |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module ActiveRecord | |
class Connection | |
def connect | |
Thread.current.thread_variable_set(:connection_id, 123) | |
end | |
end | |
end | |
module Sequel | |
class Connection |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$state = 0 | |
def lol(x, y) | |
$state += 1 | |
puts "Incrementing state it's now #{$state}" | |
[:bla, $state] | |
end | |
a, e = lol(:screw, :this) until e == 3 | |
puts "a=#{a} e=#{e}" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$state = 0 | |
def lol(x, y) | |
$state += 1 | |
puts "Incrementing state it's now #{$state}" | |
[:bla, $state] | |
end | |
a, e = lol(:screw, :this) until e == 3 | |
puts "a=#{a} e=#{e}" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
% brew --config :( | |
HOMEBREW_VERSION: 0.9.4 | |
ORIGIN: https://github.com/mxcl/homebrew.git | |
HEAD: ba09af5da322ce5506be593629a20835702c5d26 | |
HOMEBREW_PREFIX: /usr/local | |
HOMEBREW_CELLAR: /usr/local/Cellar | |
CPU: quad-core 64-bit arrandale | |
OS X: 10.8.4-x86_64 | |
Xcode: 5.0 => /Applications/Xcode5-DP5.app/Contents/Developer | |
CLT: 5.0.0.0.1.1372877146 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
self.collectionView = ({ | |
UICollectionViewFlowLayout *flowLayout = [[UICollectionViewFlowLayout alloc] init]; | |
UICollectionView *collectionView = [[UICollectionView alloc] initWithFrame:self.view.bounds | |
collectionViewLayout:flowLayout]; | |
collectionView.delegate = self; | |
collectionView.dataSource = self; | |
collectionView; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module MyApp::ModelNameFix | |
def model_name | |
@_model_name ||= ActiveModel::Name.new(self, nil, self.name.sub(/^#{self.parent.name}::/, '')) | |
end | |
def namespaced_model_name | |
@_namespaced_model_name ||= ActiveModel::Name.new(self) | |
end | |
# Work with Draper |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<msch> RhodiumToad: so the simple advice is, "always use timestamptz, never timestamp"? | |
<RhodiumToad> when storing a future time, the way to decide is this: | |
<RhodiumToad> there are a few apps where timestamp without time zone has its uses. | |
<RhodiumToad> e.g. things like calendaring / scheduling which are dealing mostly in future times | |
<RhodiumToad> does it matter how many seconds/minutes/hours there are between now and then, | |
<RhodiumToad> or does it matter what the clock on the wall will read then | |
<RhodiumToad> in the first case you need timestamptz, in the second case, timestamp without time zone, | |
<RhodiumToad> possibly with a separate field (possibly in some other table) storing the timezone name | |
<RhodiumToad> otherwise, you run into the same problem that many calendaring apps did when the US DST rules were changed |
NewerOlder