Skip to content

Instantly share code, notes, and snippets.

View pepicrft's full-sized avatar
🌱
Open-sourcing

Pedro Piñera Buendía pepicrft

🌱
Open-sourcing
View GitHub Profile
@pepicrft
pepicrft / README.md
Created April 12, 2014 09:57
Install specific version of Gradle into your OSX system
  • Move to /usr/local folder
  • Execute `brew versions gradle'
  • Copy the checkout command of the version you want and execute it git checkout 01f2e6f Library/Formula/gradle.rb
  • Run brew install gradle
[alias]
co = checkout
ci = commit
st = status
br = branch
cached = diff --cached
hist = log --pretty=format:\"%h %ad | %s%d [%an]\" --graph --date=short
type = cat-file -t
dump = cat-file -p
#clb = branch --merged | grep -v "\*" | xargs -n 1 git branch -d
@pepicrft
pepicrft / .zshrc
Created September 20, 2014 14:53
Oh-my-zsh config
# Path to your oh-my-zsh installation.
export ZSH=$HOME/.oh-my-zsh
# Set name of the theme to load.
# Look in ~/.oh-my-zsh/themes/
# Optionally, if you set this to "random", it'll load a random theme each
# time that oh-my-zsh is loaded.
ZSH_THEME="agnoster"
DEFAULT_USER="pepibumur"
@pepicrft
pepicrft / vim_steps
Last active August 29, 2015 14:06
VIM First steps and plugins
########## TOOLS #####################
## VimGolf
Real Vim ninjas count every keystroke - do you?
http://www.vimgolf.com/
#VIM Screencast
http://derekwyatt.org/vim/tutorials/novice/
# Janus: Vim Distribution
@pepicrft
pepicrft / setup_your_ios_projects_for_testing.md
Last active August 29, 2015 14:07
Post talking about testing in iOS project for Redbooth Engineering blog

Setup your iOS projects for testing

image

In other programming communities, like the Ruby one, developers are more aware of testing new components. Ensuring every component is tested is not common within the mobile appcommunity.

Fortunately, iOS developers have been working over the years to bring that culture to iOS too. The community is developing new libraries that use native ones allow you to write your tests with a fresh and more readable syntax. This has provided a big impulse and every day more and more developers ensure that expected behaviour in their apps is tested.

The Redbooth iOS Team we've been strongly influenced by the Ruby backend team and we decided to introduce testing into our development flow. Thanks to components like Cocoapods, Schemes and targets and some other tools, testing has become an essential part of development cycle.

@pepicrft
pepicrft / steps.md
Last active August 30, 2016 23:24
Setup the Android SDK/NDK in OSX
  1. Install the SDK using brew
brew install android-sdk
brew install android-ndk
  1. Set the environment vars
export BREW_HOME="$(brew --prefix)"
export ANDROID_HOME="${BREW_HOME}/opt/android-sdk"
export PATH="$PATH:${ANDROID_HOME}/tools"
@pepicrft
pepicrft / FacebookShare
Created February 22, 2015 10:42
Facebook Share
+ (void)shareUsingFeedDialog:(NSString *)url completionBlock:(void (^)(NSError *))completion
{
void (^shareBlock)() = ^void() {
NSMutableDictionary *params = [NSMutableDictionary dictionaryWithObjectsAndKeys:@"http://8fit.com/workouts", @"link", nil];
[FBWebDialogs presentFeedDialogModallyWithSession:nil
parameters:params
handler:^(FBWebDialogResult result, NSURL *resultURL, NSError *error) {
if (error) {
DDLogError(@"Error sharing using feed dialog");
if (completion) {
func tableView(tableView: UITableView, cellForRowAtIndexPath indexPath: NSIndexPath) -> UITableViewCell {
return UITableViewCell()
}
objectToObserve.addObserver(self, forKeyPath: "myDate", options: .New, context: &myContext)
NSNotificationCenter.defaultCenter().addObserver(self, selector: "contextWillSave:", name: NSManagedObjectContextWillSaveNotification, object: self)