Skip to content

Instantly share code, notes, and snippets.


William Mora wmora

View GitHub Profile
Kmohamed / Build_Framework
Last active March 22, 2021 15:30
This script build iOS Universal Framework with it's DSYMs
View Build_Framework
set -e
set +u
# Avoid recursively calling this script.
exit 0
set -u
donnfelker / config
Last active November 19, 2019 11:28
Watch or Unwatch a file in git
View config
# Goes in your .git/config file
# Temporarily stop tracking a file in git.
# usage: git unwatch path/to/file
unwatch = update-index --assume-unchanged
# Resume tracking a file in git.
# usage: git watch path/to/file
watch = update-index --no-assume-unchanged
dannytranlx /
Last active April 5, 2022 11:15 — forked from dmglab/
how to git

Note: this is a summary of different git workflows putting together to a small git bible. references are in between the text

How to branch

Try to keep your hacking out of the master and create feature branches. The [feature-branch workflow][4] is a good median between noobs (i have no idea how to branch) and git veterans (let's do some rocket science with git branches!). Everybody get the idea!

Basic usage examples

mackuba /
Last active August 6, 2022 17:28
New stuff from WWDC 2015

Here's my own list of the interesting stuff announced during this year's WWDC, collected from the keynotes, various Apple docs, blog posts and tweets.

If you're planning to watch the videos, I really recommend this Mac app that helps you download and watch them:

OS X El Capitan

  • split view - two apps side by side on full screen
JakeWharton / gist:f50f3b4d87e57d8e96e9
Created February 7, 2015 01:59
Rise and Shine™, unlock and wake up your device automatically when you deploy from the IDE. Put this somewhere in your `src/debug/` code and run it when the application or main activity starts. Apache 2.
View gist:f50f3b4d87e57d8e96e9
* Show the activity over the lockscreen and wake up the device. If you launched the app manually
* both of these conditions are already true. If you deployed from the IDE, however, this will
* save you from hundreds of power button presses and pattern swiping per day!
public static void riseAndShine(Activity activity) {
PowerManager power = (PowerManager) activity.getSystemService(POWER_SERVICE);
PowerManager.WakeLock lock =
ericelliott /
Last active February 3, 2023 01:06
Essential JavaScript Links
tonymtz / gist:d75101d9bdf764c890ef
Last active December 24, 2022 05:09
Uninstall nodejs from OSX Yosemite
View gist:d75101d9bdf764c890ef
# first:
lsbom -f -l -s -pf /var/db/receipts/ | while read f; do sudo rm /usr/local/${f}; done
sudo rm -rf /usr/local/lib/node /usr/local/lib/node_modules /var/db/receipts/org.nodejs.*
# To recap, the best way (I've found) to completely uninstall node + npm is to do the following:
# go to /usr/local/lib and delete any node and node_modules
cd /usr/local/lib
sudo rm -rf node*
Jogan /
Last active June 24, 2022 16:55
Implementation of Android L's floating action button pattern. API 14+
package your_package;
import android.animation.AnimatorSet;
import android.animation.ObjectAnimator;
import android.content.Context;
View findByIdAndUpdate-addtoset.js
var mongoose = require('mongoose');
var Schema = mongoose.Schema;
var assert = require('assert')
console.log(' mongoose version: %s', mongoose.version);
mongoose.connect('localhost', 'testing_findAndModifyAddToSet');