Skip to content

Instantly share code, notes, and snippets.

View nexus-uw's full-sized avatar
🍚
bleh

Simon Ramsay nexus-uw

🍚
bleh
View GitHub Profile

Keybase proof

I hereby claim:

  • I am nexus-uw on github.
  • I am nexusuw (https://keybase.io/nexusuw) on keybase.
  • I have a public key ASAIlDoO5lW-1VOUKt8ChFnHjrQppy_3UCVT2CtYDFfddAo

To claim this, I am signing this object:

c1fa8a6ba5f1d598d8ffb2ecb8e053b7a2b8f692abbce8b88b375678c7d020a516a497dbc88dfdd0a67b473ea7b3984f614311d46ae15ba9d83cffc105495637

@nexus-uw
nexus-uw / save_retrieve.js
Created May 29, 2017 19:30
save/retrieve state in the query string
function saveParamsToUrlQuery(state) {
const queryString = Object.keys(state)
.reduce((res, key) => state[key] ?
res += `${encodeURIComponent(key)}=${encodeURIComponent(state[key])}&` :
res,
'');
history.pushState({}, 'generate-routes', window.location.pathname + '?' + queryString);
}
function loadInputFromUrl() {
@nexus-uw
nexus-uw / keybase.md
Last active April 14, 2016 17:24
keybase.md

Keybase proof

I hereby claim:

  • I am nexus-uw on github.
  • I am nexusuw (https://keybase.io/nexusuw) on keybase.
  • I have a public key ASD-s-uJoMWdGhNoHubFelgmA3FCnwbYKu1wMEsY1UUUwAo

To claim this, I am signing this object:

@nexus-uw
nexus-uw / directiveExample.ts
Created July 29, 2015 18:19
example use of Angular Directive return type in typescript
export let myDirective = (): ng.IDirective => {
return {
restrict: 'E',
scope: {
databound : '='
},
controllerAs: 'ctrl',
bindToController: true,
templateUrl: 'template.html',
controller: MyControllerClass
@nexus-uw
nexus-uw / gist:d72060e67c62fe74671c
Created July 22, 2015 16:53
how to launch brew installed Visual Studio Code from the command line
/opt/homebrew-cask/Caskroom/visual-studio-code/latest/VSCode-darwin/Visual\ Studio\ Code.app/Contents/MacOS/Electron