This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
unzip -o <ZIP_FILE> -d <DESTINATION_DIR> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
adb shell 'pm list packages -f -3' | sed -e 's/.*=//' | sort |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env ruby | |
# encoding: utf-8 | |
require 'rubygems' unless defined? Gem # rubygems is only needed in 1.8 | |
require_relative "bundle/bundler/setup" | |
require "alfred" | |
require 'json' | |
basic_user = ENV['BB_USER_NAME'] | |
basic_password = ENV['BB_PASSWORD'] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$.webview.url="http://www.w3schools.com/"; | |
$.webview.addEventListener('beforeload', function(e) { | |
if (e.url != $.webview.url) { | |
e.bubble = false; | |
$.webview.stopLoading(); | |
Ti.Platform.openURL(e.url); | |
} | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$.webView.addEventListener('beforeload', function(e) { | |
if ((OS_IOS && e.navigationType == Titanium.UI.iOS.WEBVIEW_NAVIGATIONTYPE_LINK_CLICKED) | |
|| (OS_ANDROID && e.url !== $.webView.getUrl())) { | |
// stop the event | |
e.bubble = false; | |
e.cancelBubble = true; | |
// stop the url from loading |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sudo find /private/var/folders/ \ -name com.apple.dock.iconcache -exec rm {} \; | |
sudo find /private/var/folders/ \ -name com.apple.iconservices -exec rm -rf {} \; | |
sudo rm -rf /Library/Caches/com.apple.iconservices.store |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Add the remote, call it "upstream": | |
git remote add upstream https://github.com/whoever/whatever.git | |
# Fetch all the branches of that remote into remote-tracking branches, | |
# such as upstream/master: | |
git fetch upstream | |
# Make sure that you're on your master branch: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!-- Example: | |
<Module id="paint" module="ti.paint" method="createPaintView" eraseMode="false" strokeWidth="1.0" strokeColor="red" strokeAlpha="100" /> | |
--> | |
<Module module="" method="" id="" /> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
console.log(moment().format('YYYYMMDDHHmmss_')); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Apparently with OSX el Capitan, there is a new security function that prevents | |
# you from modifying system files called Rootless. | |
# So you'll have 2 options: If you install gems on "/usr/local/bin" | |
# there will be no problem because rootless doesn't affect this path. | |
sudo gem install -n /usr/local/bin GEM_NAME_HERE |