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
// pulled from SO http://stackoverflow.com/questions/6393943/convert-javascript-string-in-dot-notation-into-an-object-reference | |
// NOTE: Array.reduce() may not be available in older browsers | |
function index(obj,i) {return obj[i]} | |
'a.b.etc'.split('.').reduce(index, obj); | |
var obj = {a:{b:{etc:5}}}; | |
index(obj,'a.b.etc'); |
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
1) Open repo in tower. | |
2) Right-click on remotes/origin in left pane. | |
3) Select `Edit Connection Settings`. |
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
// The following is a configuration example to lazy load translations. It's meant to provide specificity and clarity to | |
// anyone still wondering how it all fits together, I have the following setup (using abbreviated module definitions): | |
//////////////////////////////////////////////////////////////////////////////////////////////////////////// | |
// AppModule | |
//////////////////////////////////////////////////////////////////////////////////////////////////////////// | |
// AoT requires an exported function for factories. | |
export function HttpLoaderFactory(http: HttpClient): TranslateHttpLoader { |
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
find . -name .DS_Store -print0 | xargs -0 git rm --ignore-unmatch |
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 urlList = model.getURLs(); | |
var loadAndParse = function (url) | |
{ | |
// both load() and parse() are promise based functions | |
return load(url).then(parse); | |
}; | |
/** | |
* Allows for the sequentially calling of promise based functions by iterating over a list of |
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
echo '' | openssl s_client -connect www.okta.com:443 |
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
// Taken from SO: https://stackoverflow.com/questions/47119426/how-to-set-file-objects-and-length-property-at-filelist-object-where-the-files-a | |
const dT = new ClipboardEvent('').clipboardData || // Firefox < 62 workaround exploiting https://bugzilla.mozilla.org/show_bug.cgi?id=1422655 | |
new DataTransfer(); // specs compliant (as of March 2018 only Chrome) | |
dT.items.add(new File(['foo'], 'programmatically_created.txt')); | |
inp.files = dT.files; |
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
####################### | |
# Chrome | |
alias chrome="open /Applications/Google\ Chrome.app/" | |
alias chromedev="open /Applications/Google\ Chrome.app/ --args --ignore-certificate-errors --allow-running-insecure-content --reduce-security-for-testing --disable-web-security --unsafely-treat-insecure-origin-as-secure=http://local-dev.siriusxm.com:8890 --user-data-dir=~/Library/Application Support/Google/Chrome/Default" | |
####################### |
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
describe("Foo constructor", function() { | |
it("should call its `bar()` instance method.", function() { | |
spyOn(Foo.prototype, 'bar'); | |
var foo = new Foo(); | |
expect(Foo.prototype.bar).toHaveBeenCalled(); | |
}); | |
}); |
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
#!/bin/sh | |
# | |
# Pre-commit hooks | |
###################################################################### | |
# Environment Setup | |
# 1) Change directory to build dir so we can run grunt tasks. | |
# 2) Make sure path is extended to include grunt task executable | |
# dir, as this commit shell is executed in the git | |
# client's own shell; ie Tower and WebStorm have own shell path. |
NewerOlder