Skip to content

Instantly share code, notes, and snippets.

Ralf Ebert ralfebert

Block or report user

Report or block ralfebert

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View UIColorFromRGB.h
// 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];
}
@ralfebert
ralfebert / gist:1255969
Created Oct 1, 2011
Ruby String helpers: indent, to_javadoc, markdown, pygmentize
View gist:1255969
# 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
View p2.inf (http)
instructions.configure=\
addRepository(type:0,location:http${#58}//localhost:1234/repository/);\
addRepository(type:1,location:http${#58}//localhost:1234/repository/);
View .bashrc
# Prompt (Debian)
source /usr/local/bin/git-completion.sh
# Prompt (OS X + homebrew)
source /usr/local/etc/bash_completion.d/git-completion.bash
PS1="\[\033[31;38m\]\w\[\033[1;31m\]\$(__git_ps1)\[\033[00m\] "
export GIT_PS1_SHOWDIRTYSTATE=1
You can’t perform that action at this time.