Skip to content

Instantly share code, notes, and snippets.

View nbomberger's full-sized avatar

Nathaniel Bomberger nbomberger

View GitHub Profile
@nbomberger
nbomberger / .gitconfig
Last active December 22, 2015 13:19
Git config file to add colors and shortcuts.
[user]
name = <your name>
email = <email address>
logallrefupdates=true
[core]
excludesfile = /Users/nbomberger/.gitignore_global
[credential]
helper = osxkeychain
[difftool "Kaleidoscope"]
cmd = ksdiff --partial-changeset --relative-path \"$MERGED\" -- \"$LOCAL\" \"$REMOTE\"
// http://cocoawithlove.com/2009/10/ugly-side-of-blocks-explicit.html has a nice breakdown of the syntax--it helps to think of the ^ as similar to a pointer dereference symbol *
// block typedef:
typedef void(^Block)();
typedef void(^ConditionalBlock)(BOOL);
typedef NSString*(^BlockThatReturnsString)();
typedef NSString*(^ConditionalBlockThatReturnsString)(BOOL);
// block property with typedef:
//
// iOS_API+Blocks.h
//
// Created by Bobby Schultz on 12/1/11.
@interface UIAlertView (PBBlocks)
+ (id) alertWithTitle:(NSString*)title
message:(NSString*)message
clickedBlock:(void(^)(NSInteger))buttonIndexClickedBlock
#########################
# .gitignore file for Xcode4 / OS X Source projects
#
# Version 2.0
# For latest version, see: http://stackoverflow.com/questions/49478/git-ignore-file-for-xcode-projects
#
# 2013 updates:
# - fixed the broken "save personal Schemes"
#
# NB: if you are storing "built" products, this WILL NOT WORK,
#!/usr/bin/ruby
# Markdown to Evernote, RubyCocoa edition
# by Brian Gernhardt
# Adapted from Martin Kopichke's "Markdown to Evernote" service
# https://gist.github.com/kopischke/1009149
# Which was adapted from Brett Terpstra’s original
# http://brettterpstra.com/a-better-os-x-system-service-for-evernote-notes-with-multimarkdown/
/* Better styles for embedding GitHub Gists */
.gist{font-size:13px;line-height:18px;margin-bottom:20px;width:100%}
.gist pre{font-family:Menlo,Monaco,'Bitstream Vera Sans Mono','Courier New',monospace !important}
.gist-meta{font-family:Helvetica,Arial,sans-serif;font-size:13px !important}
.gist-meta a{color:#26a !important;text-decoration:none}
.gist-meta a:hover{color:#0e4071 !important}
#!/usr/bin/ruby
# Markdown to Evernote, RubyCocoa edition
# by Brian Gernhardt
# Adapted from Martin Kopichke's "Markdown to Evernote" service
# https://gist.github.com/kopischke/1009149
# Which was adapted from Brett Terpstra’s original
# http://brettterpstra.com/a-better-os-x-system-service-for-evernote-notes-with-multimarkdown/
[user]
name = Joe User
email = [email protected]
[branch]
autosetupmerge = true
[branch "master"]
remote = origin
merge = refs/heads/master
@nbomberger
nbomberger / git_from_source.md
Last active December 19, 2015 20:18
Install Git from Source on Linux

To install Git, you need to have the following libraries that Git depends on: curl, zlib, openssl, expat, and libiconv. For example, if you’re on a system that has yum (such as Fedora) or apt-get (such as a Debian based system), you can use one of these commands to install all of the dependencies:

$ yum install curl-devel expat-devel gettext-devel openssl-devel zlib-devel

$ apt-get install libcurl4-gnutls-dev libexpat1-dev gettext libz-dev libssl-dev

When you have all the necessary dependencies, you can go ahead and grab the latest snapshot from the Git web site:

http://git-scm.com/download