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
# remove specific file from git cache | |
git rm --cached filename | |
# remove all files from git cache | |
git rm -r --cached . | |
git add . | |
git commit -m ".gitignore is now working" |
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
kony.i18n._getLocalizedString = kony.i18n.getLocalizedString; | |
kony.i18n.getLocalizedString = (key, scope) => { | |
var s = kony.i18n._getLocalizedString(key); | |
if(!s) return key; | |
for (var property in scope) { | |
if (scope.hasOwnProperty(property)) { | |
s = s.replace("${" + property + "}", scope[property]); | |
} |
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
alias fontnames='for file in "$arg"*.{ttf,otf}; do | |
postscriptname=$(fc-scan --format "%{postscriptname}\n" $file); | |
printf "\033[36m PostScript Name:\033[0m %s \e[90m(%s)\033[0m\n" "$postscriptname" "$file"; | |
done' | |
alias vis='open -a /Applications/kony/KonyVisualizerEnterprise8/Kony\ Visualizer\ Enterprise.app' | |
alias vislog='cat ~/Kony\ Visualizer/vizdata/logs/konyvizenterprise.log' | |
alias vislogs='open ~/Kony\ Visualizer/vizdata/logs/' | |
#alias shorten_my_promt="PS1='\u:\W\$ '" |
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
var baseURL = "https://app.ombud.com/v1/rx/AWQDn7ewgLe6Qjc33rXM/documents/AWjw3gjm4XgXoZ-r27ON/webview_preview"; | |
var entries= document.getElementsByClassName("entry"); | |
var count = entries.length; | |
console.log("Total %d", count); | |
var index = []; | |
for (var i = 0; i < count; i++) { | |
var entry = entries[i]; | |
var question = entry.getElementsByClassName("question")[0].innerText; | |
index.push({ | |
index: i+1, |
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
initGettersSetters: function() { | |
//Field foo | |
defineGetter(this, "foo", () => {return this._foo;}); | |
defineSetter(this, "foo", (foo) => {this._foo = foo;}); | |
//Field bar | |
defineGetter(this, "bar", () => {return this._bar;}); | |
defineSetter(this, "bar", (bar) => {this._bar = bar;}); | |
} |
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
/* AUTO GENERATED CONTENT */ | |
(function(mod) { | |
if (typeof exports == "object" && typeof module == "object") // CommonJS | |
module.exports = mod(); | |
else if (typeof define == "function" && define.amd) // AMD | |
return define([], mod); | |
else // Plain browser env | |
return mod(); | |
})(function() { |
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
/* | |
* Convert something like mymap: {foo: 0, bar: 1, qux:2} into | |
* myarr: [{foo: 0}, {bar: 1}, {qux:2}] */ | |
function mapToArray(propName){ | |
var res = resultToJSON(result); | |
var map = res[propName]; | |
var array = []; | |
for(r in map){ | |
var obj = {}; | |
obj[r] = map[r]; |
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
define(["util/doBar", "util/getQux"], function(doBar, getQux){ | |
const PI = 3.1416 | |
let count = 0 | |
function doFoo(){ //This is a static function. | |
//TODO | |
} | |
return{ |
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
//Break component code into separate modules and load them as dependencies. | |
define(["./animateIn, ./validateSomething"], function(animateIn, validateSomething) { | |
// Static constant. Shared across instances of this component. Can't be changed. | |
const SOME_CONSTANT = 3.14159; | |
// Static variable. Shared across instances of this component. Can be changed by any instance. | |
var count = 0; | |
// Static function. Shared by all instances of this component. Can't be changed. |
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
alias gitify_my_prompt="PS1='\[\033[96m\]\W\[\033[95m\] [\$(git symbolic-ref --short HEAD 2>/dev/null)]\[\033[00m\]\$' " | |
gitify_my_prompt |