Skip to content

Instantly share code, notes, and snippets.

Avatar

William Mora wmora

View GitHub Profile
@Kmohamed
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.
if [[ $SF_MASTER_SCRIPT_RUNNING ]]
then
exit 0
fi
set -u
export SF_MASTER_SCRIPT_RUNNING=1
@donnfelker
donnfelker / config
Last active November 19, 2019 11:28
Watch or Unwatch a file in git
View config
# Goes in your .git/config file
[alias]
# 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
dannytranlx / git_bible.md
Last active April 5, 2022 11:15 — forked from dmglab/git_bible.md
how to git
View git_bible.md

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
mackuba / wwdc15.md
Last active August 6, 2022 17:28
New stuff from WWDC 2015
View wwdc15.md

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: https://github.com/insidegui/WWDC.

OS X El Capitan

http://www.apple.com/osx/elcapitan-preview/

  • split view - two apps side by side on full screen
@JakeWharton
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) {
activity.getWindow().addFlags(FLAG_SHOW_WHEN_LOCKED);
PowerManager power = (PowerManager) activity.getSystemService(POWER_SERVICE);
PowerManager.WakeLock lock =
@ericelliott
ericelliott / essential-javascript-links.md
Last active February 3, 2023 01:06
Essential JavaScript Links
View essential-javascript-links.md
@tonymtz
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/org.nodejs.pkg.bom | 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
Jogan / FloatingActionButton.java
Last active June 24, 2022 16:55
Implementation of Android L's floating action button pattern. API 14+
View FloatingActionButton.java
package your_package;
import android.animation.AnimatorSet;
import android.animation.ObjectAnimator;
import android.app.Activity;
import android.content.Context;
import android.graphics.Bitmap;
import android.graphics.Canvas;
import android.graphics.Color;
import android.graphics.Paint;
View findByIdAndUpdate-addtoset.js
var mongoose = require('mongoose');
var Schema = mongoose.Schema;
var assert = require('assert')
console.log('\n===========');
console.log(' mongoose version: %s', mongoose.version);
console.log('========\n\n');
mongoose.connect('localhost', 'testing_findAndModifyAddToSet');