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
/* 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
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
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
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
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
# 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
android.libraryVariants.all { variant -> | |
def variantName = variant.name.capitalize() | |
def copyTaskName = "copy${variantName}Artifacts" | |
def assembleTaskName = "assemble${variantName}" | |
task(copyTaskName, type: Copy, dependsOn: assembleTaskName, group: "build") { | |
variant.outputs.each { output -> | |
def newOutputName = output.outputFile.name.replace(".aar", "-" + android.defaultConfig.versionName + ".aar") | |
from(output.outputFile.parent) { | |
include output.outputFile.name | |
rename output.outputFile.name, newOutputName |
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
//From https://forums.aws.amazon.com/thread.jspa?messageID=798024#798024 | |
//Create a GenericRunner class as below: | |
import org.testng.annotations.AfterClass; | |
import org.testng.annotations.BeforeClass; | |
import org.testng.annotations.DataProvider; | |
import org.testng.annotations.Test; | |
import cucumber.api.testng.CucumberFeatureWrapper; | |
import cucumber.api.testng.TestNGCucumberRunner; |
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
<project> | |
... | |
<build> | |
<plugins> | |
<plugin> | |
<groupId>org.apache.maven.plugins</groupId> | |
<artifactId>maven-compiler-plugin</artifactId> | |
<version>3.7.0</version> | |
<configuration> | |
<source>1.8</source> |