Skip to content

Instantly share code, notes, and snippets.

@supermarin
supermarin / mneorr.zsh-theme
Created January 31, 2012 21:59
My zSH theme
local return_code="%(?..%{$fg[red]%}%? ↵%{$reset_color%})"
local current_dir="%{$terminfo[bold]$fg[green]%}%2c%{$reset_color%}"
local git_escaped='$(git_prompt_info)'
local green_arrow="%{$fg_bold[green]%}➜"
PROMPT="${git_escaped} ${green_arrow} "
RPS1="${return_code}"
RPROMPT="${current_dir}"
@supermarin
supermarin / objc-category-ivar.m
Created July 20, 2012 07:33
New: iVars / static vars in OBJC categories
//
// NSString+DomainInput.m
// Domainchy
//
// Created by Marin Usalj on 7/13/12.
// Copyright (c) 2012 mneorr.com | @mneorr | mneorr@gmail.com. All rights reserved.
//
#import "NSString+DomainInput.h"
@supermarin
supermarin / Rakefile
Created September 27, 2012 15:58
Rakefile for Xcode development with Cocoapods and Git Submodules
workspace = Dir.entries(Dir.pwd).select {|file| file.match '.xcworkspace'}.first
def execute(cmd)
verbose(false) { sh cmd }
end
task :launch do
`open #{workspace}`
end
@supermarin
supermarin / NSStringLiterals.m
Created December 5, 2012 22:14
NSString literals
// Currently, there's too much effort for printing strings with arguments.
// The current way
NSString *sentence = [NSString stringWithFormat:@"This is a text with argument %@", argument];
// Possible literal
NSString *sentence = @("This is a text with argument %@", argument);
@supermarin
supermarin / gist:5597771
Last active December 17, 2015 10:49
Testing asynchronous methods with Kiwi
//
// BeerTests.m
// Beer
//
// Created by Marin Usalj on 5/16/13.
// Copyright 2013 @mneorr | mneorr.com. All rights reserved.
//
#import "Kiwi.h"
@supermarin
supermarin / wo.fish
Created June 10, 2013 16:31
Quickly move from / to project directories in Fish shell
# Search through my code directories and quickly open project folder
# wo = workon
function wo
set -l code_dir ~/code
cd (find $code_dir -type d -maxdepth 3 | grep -i $argv | grep -Ev Pods --max-count=1)
end
@supermarin
supermarin / gist:5983009
Last active December 19, 2015 16:19 — forked from alloy/gist:5982920

Open-source logo licensing

Our open-source project (CocoaPods) has a logo drawn by a commissioned designer (@maxsteenbergen). Basically, we want Max Steenbergen to retain his copyright over the logo, but give us (CocoaPods) an exclusive license to do what we want, as described below.

We want our users to:

  1. BE ABLE to use the logo AS-IS for CocoaPods promotional purposes. Some examples are:
  • In a blog post about (amongst others) CocoaPods.
  • On the website of a commercial continuos-integration platform, to indicate they support CocoaPods projects.
  • Sell (i.e. commercial) stickers/t-shirts/mugs etc with the logo on it.
@supermarin
supermarin / dash_emoji_snippets.sql
Last active January 30, 2020 19:58
Emoji in realtime with Dash.app Thanks @orta for putting this up. Read below for importing instructions
INSERT INTO 'snippets' ('title', 'body') VALUES
(':+1:', '👍'),
(':-1:', '👎'),
(':100:', '💯'),
(':1234:', '🔢'),
(':8ball:', '🎱'),
(':a:', '🅰'),
(':ab:', '🆎'),
(':abc:', '🔤'),
(':abcd:', '🔡'),
# Reveal
command script import ~/.lldb/reveal.py
### Keybase proof
I hereby claim:
* I am supermarin on github.
* I am supermarin (https://keybase.io/supermarin) on keybase.
* I have a public key whose fingerprint is 3273 1825 4E09 CEA1 DCFA 9451 8BE5 6326 1DA7 6B98
To claim this, I am signing this object: