Skip to content

Instantly share code, notes, and snippets.

Avatar
🌎
Online

Julian Villella JVillella

🌎
Online
  • Toronto, Ontario
View GitHub Profile
@JVillella
JVillella / es_push.rb
Created Aug 3, 2016
ES Push Ruby Client
View es_push.rb
require 'digest/md5'
require 'singleton'
require 'typhoeus'
module Services
class ESPush
include Singleton
BASE_URL = 'https://espush.cn/openapi'
View backbone-event-logging.js
// Place this code in your extended Backbone class to log all fired events.
Backbone.Model.prototype.trigger = function() {
console.log('Event', arguments);
Backbone.Events.trigger.apply(this, arguments);
}
@JVillella
JVillella / remove-branches.md
Last active Aug 29, 2015
Remove all local branches but master
View remove-branches.md

The following command will remove all local git branches except the master branch.

git checkout master && git branch | grep -v "master" | xargs git branch -D

@JVillella
JVillella / android-assets-helper.md
Last active Aug 29, 2015
Organize Android Assets
View android-assets-helper.md

Run the following code in your terminal with sh android-assets-helper.sh. The script should be in the same directory as your assets. Assets should be named as so your_asset-mdpi.png, your_asset-hdpi.png, your_asset-xhdpi.png, etc.

Do this for:

  • mdpi
  • hdpi
  • xhdpi
  • xxhdpi
  • xxxhdpi
@JVillella
JVillella / XCodeBumpVersion.md
Last active Aug 29, 2015
XCode Bump Version Number Script
View XCodeBumpVersion.md

In Xcode you can auto-increment the build number as a decimal number by placing the following in the Run script build phase in the project settings

#!/bin/bash
buildNumber=$(/usr/libexec/PlistBuddy -c "Print CFBundleVersion" "$INFOPLIST_FILE")
buildNumber=$(($buildNumber + 1))
/usr/libexec/PlistBuddy -c "Set :CFBundleVersion $buildNumber" "$INFOPLIST_FILE"

For hexadecimal build number use this script

#!/bin/bash
@JVillella
JVillella / deploy-steps.md
Last active Aug 29, 2015
Deploying to Master
View deploy-steps.md

###Deploying to Master #####Creating a Release Branch

$ git checkout development
    Switched to branch 'development'
    
$ git checkout -b release-1.2
    Switched to a new branch "release-1.2"
    
$ ./bump-version.sh 1.2
You can’t perform that action at this time.