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
From 5366b677f1f7a1053de5904f96ba5108ffaf8953 Mon Sep 17 00:00:00 2001 | |
From: Ralf Ebert <info@ralfebert.de> | |
Date: Thu, 7 May 2015 23:33:01 +0200 | |
Subject: [PATCH] Fix for #844: Incompatibility haml (4.0.6) -> sprockets | |
(3.0.3) causing error 'wrong number of arguments' for inline :sass filter in | |
haml template | |
--- | |
lib/haml/sass_rails_filter.rb | 2 +- | |
1 file changed, 1 insertion(+), 1 deletion(-) |
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
// For example: | |
// UIColorFromRGBA(0xffee00, 0.5) | |
// UIColorFromRGB(0xffee00) | |
static inline UIColor *UIColorFromRGBA(int rgb, float a) { | |
return [UIColor colorWithRed:((float)((rgb & 0xFF0000) >> 16))/255.0 | |
green:((float)((rgb & 0xFF00) >> 8))/255.0 | |
blue:((float)(rgb & 0xFF))/255.0 alpha:a]; | |
} |
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
set datafile separator ';' | |
set terminal png | |
set output 'values.png' | |
f(x) = a*x + b | |
fit f(x) 'values.csv' using 1:2 via a, b | |
plot 'values.csv' using 1:2, f(x) title sprintf('%.2fx + %.2f', a, b) |
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
git config --global core.editor "nano -Y patch" | |
git config --global core.editor "'C:\Program Files (x86)\Notepad++\notepad++.exe' \ | |
-multiInst -notabbar -nosession -noPlugin" | |
git config --global core.editor "gedit -w -s" | |
git config --global core.editor "mate -w" |
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
git config --global alias.clear '!git reset --hard;git clean -fd' |
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
git config --global alias.lg "log --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr %an)%Creset' --abbrev-commit --date=relative" |
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
# Placed in Public Domain by Ralf Ebert, 2008 | |
# | |
# THIS SOFTWARE IS PROVIDED BY Ralf Ebert ''AS IS'' AND ANY | |
# EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED | |
# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE | |
# DISCLAIMED. IN NO EVENT SHALL Ralf Ebert BE LIABLE FOR ANY | |
# DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES | |
# (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; | |
# LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND | |
# ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
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
instructions.configure=\ | |
addRepository(type:0,location:http${#58}//localhost:1234/repository/);\ | |
addRepository(type:1,location:http${#58}//localhost:1234/repository/); |
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
#!/usr/bin/env ruby | |
require 'nokogiri' | |
def show_usage(msg = nil) | |
puts "#{msg}\n\n" if msg | |
puts "Usage:\n\t#{$PROGRAM_NAME} [storyboard_file]" | |
exit(0) | |
end |
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
func arrayWith(count: Int, sum : Int) -> [Int] { | |
assert(count >= 1) | |
var result = [sum] | |
while result.count < count { | |
let randomIndex = result.indices.randomElement()! | |
let v = Int.random(in: 0...result[randomIndex]) | |
result[randomIndex] -= v | |
result.append(v) | |
} | |
return result |
OlderNewer