Skip to content

Instantly share code, notes, and snippets.


Daniel Gomez danielgomezrico

View GitHub Profile
rsaunders100 / alert.m
Created Sep 19, 2011
(iOS) UIAlert View Example - Has a delegate for Yes/No Taps Will only display popup once
View alert.m
- (void) showConfirmationAlert
// A quick and dirty popup, displayed only once
if (![[NSUserDefaults standardUserDefaults] objectForKey:@"HasSeenPopup"])
UIAlertView *alert = [[UIAlertView alloc]initWithTitle:@"Question"
message:@"Do you like cats?"
tomazzlender /
Created Feb 18, 2012 — forked from slayer/
rbenv install and system wide install on Ubuntu to /opt/rbenv
# Update, upgrade and install development tools:
apt-get update
apt-get -y upgrade
apt-get -y install build-essential
apt-get -y install git-core
# Install rbenv
git clone git:// /opt/rbenv
# Add rbenv to the path:
trey /
Last active Jun 7, 2021
Creating a Happy Git Environment on OS X

Creating a Happy Git Environment on OS X

Step 1: Install Git

brew install git bash-completion

Configure things:

git config --global "Your Name"
git config --global ""
kreeger / UIScrollView+PullToRefresh.m
Last active Nov 6, 2016
Adds pull to refresh for a UIScrollView (or a UITableView). Abstracts away differences in frameworks between iOS 6 and iOS 5 (in the case of the latter, ODRefreshControl is used. Attempts to be as similar in fashion as possible to the interface set forth in SVPullToRefresh, with a couple of minor exceptions.
View UIScrollView+PullToRefresh.m
// UIScrollView+PullToRefresh.h
// Created by Ben Kreeger (@kreeger), 2013/01/23.
#import <UIKit/UIKit.h>
/** Adds pull to refresh for a UIScrollView (or a UITableView). Abstracts away differences in frameworks between iOS 6
* and iOS 5 (in the case of the latter, `ODRefreshControl` is used.
michail-nikolaev / build.gradle
Created Mar 14, 2013
Gradle - force transitive dependency version for some group
View build.gradle
apply plugin: 'java'
configurations.all {
resolutionStrategy {
eachDependency { DependencyResolveDetails details ->
//specifying a fixed version for all libraries with 'org.gradle' group
if ( == 'org.springframework') {
details.useVersion "$springVersion"
julianshen /
Last active Jun 8, 2021
CircleTransform for Picasso
* Copyright 2014 Julian Shen
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
* Unless required by applicable law or agreed to in writing, software
chadmaughan /
Last active Jun 4, 2021
A git pre commit hook that runs the test task with the gradle wrapper
# this hook is in SCM so that it can be shared
# to install it, create a symbolic link in the projects .git/hooks folder
# i.e. - from the .git/hooks directory, run
# $ ln -s ../../git-hooks/ pre-commit
# to skip the tests, run with the --no-verify argument
# i.e. - $ 'git commit --no-verify'
kristopherjohnson /
Created Jul 31, 2013
Methods for generating ISO 8601 timestamps in Java/Android
package net.kristopherjohnson.util;
import java.text.DateFormat;
import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.Locale;
import java.util.TimeZone;
* Methods for dealing with timestamps
tshrkmd / styles_noactionbar.xml
Last active Sep 5, 2019
View styles_noactionbar.xml
<?xml version="1.0" encoding="utf-8"?>
<style name="Theme.AppCompat.Light.NoActionBar" parent="@style/Theme.AppCompat.Light">
<item name="android:windowNoTitle">true</item>
<item name="windowActionBar">false</item> <!-- For 2.x version -->
nolanlawson /
Last active Apr 29, 2021
Gradle tab completion for Bash. Works on both Mac and Linux.

Gradle tab completion script for Bash

A tab completion script that works for Bash. Relies on the BSD md5 command on Mac and md5sum on Linux, so as long as you have one of those two commands, this should work.


$ gradle [TAB]