This file contains hidden or 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
function parse_git_branch { | |
ref=$(git symbolic-ref HEAD 2> /dev/null) || return | |
echo "git:("${ref#refs/heads/}$(num_git_commits_ahead)")" | |
} | |
function num_git_commits_ahead { | |
num=$(git status 2> /dev/null \ | |
| grep "Your branch is ahead of" \ | |
| awk '{split($0,a," "); print a[9];}' 2> /dev/null) || return | |
if [[ "$num" != "" ]]; then |
This file contains hidden or 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
// temp fix for iOS8 beta, add it after the reference to cordova.js | |
if (navigator.userAgent === undefined) { | |
navigator.__defineGetter__('userAgent', function() { | |
return("Mozilla/5.0 (iPhone; CPU iPhone OS 8_0 like Mac OS X) AppleWebKit"); | |
}); | |
} |
This file contains hidden or 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
.filter('timeago', function () { | |
/* | |
* time: the time | |
* local: compared to what time? default: now | |
* raw: wheter you want in a format of "5 minutes ago", or "5 minutes" | |
*/ | |
// parse string date to milliseconds | |
// Note: months are 0-based |
This file contains hidden or 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
// These two need to be declared outside the try/catch | |
// so that they can be closed in the finally block. | |
HttpURLConnection urlConnection = null; | |
BufferedReader reader = null; | |
// Will contain the raw JSON response as a string. | |
String forecastJsonStr = null; | |
try { | |
// Construct the URL for the OpenWeatherMap query |
This file contains hidden or 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
Show hidden characters
{ | |
"color_scheme": "Packages/Dracula Color Scheme/Dracula.tmTheme", | |
"file_exclude_patterns": | |
[ | |
".DS_Store", | |
".tags*", | |
"*.pyc", | |
"*.pyo", | |
"*.exe", | |
"*.dll", |
This file contains hidden or 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
<!-- Dracula Theme v0.7.0 | |
# | |
# https://github.com/zenorocha/dracula-theme | |
# | |
# Copyright 2013, All rights reserved | |
# | |
# Code licensed under the MIT license | |
# http://zenorocha.mit-license.org | |
# | |
# @author Zeno Rocha <[email protected]> |
This file contains hidden or 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
{ | |
"node": true, // Enable globals available when code is running inside of the NodeJS runtime environment. | |
"browser": true, // Standard browser globals e.g. `window`, `document`. | |
"esnext": true, // Allow ES.next specific features such as `const` and `let`. | |
"bitwise": false, // Prohibit bitwise operators (&, |, ^, etc.). | |
"camelcase": false, // Permit only camelcase for `var` and `object indexes`. | |
"curly": false, // Require {} for every new block or scope. | |
"eqeqeq": true, // Require triple equals i.e. `===`. | |
"immed": true, // Require immediate invocations to be wrapped in parens e.g. `( function(){}() );` | |
"latedef": true, // Prohibit variable use before definition. |
This file contains hidden or 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
var pushNotification = window.plugins.pushNotification; | |
window.onNotificationAPN = onNotificationAPN; | |
pushNotification.register( | |
tokenHandler, | |
errorHandler, { | |
"badge":"true", | |
"sound":"true", | |
"alert":"true", | |
"ecb":"onNotificationAPN" |
This file contains hidden or 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
angular.module('currencyMask', []) | |
.directive('currencyMask', function () { | |
return { | |
restrict: 'A', | |
require: 'ngModel', | |
link: function (scope, element, attrs, ngModelController) { | |
// Run formatting on keyup | |
var numberWithCommas = function(value, addExtraZero) { |
This file contains hidden or 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 ln -s "/Applications/Sublime Text.app/Contents/SharedSupport/bin/subl" /usr/bin/subl |
OlderNewer