const compose = (...fns) =>
fns.reduceRight((prevFn, nextFn) =>
(...args) => nextFn(prevFn(...args)),
value => value
);
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
| #!/usr/bin/env bash | |
| PLUGIN_BASE='/opt/cisco/secureclient/bin/plugins' | |
| read -r -d '' USAGE << EGASU | |
| Usage: `basename $0` [-s|-e|-d|-h] | |
| -s, --status Print Umbrella Roaming Security module status | |
| -e, --enable Enable Umbrella Roaming Security module | |
| -d, --disable Disable Umbrella Roaming Security module |
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
| <!-- | |
| Similar to https://gist.github.com/samthor/64b114e4a4f539915a95b91ffd340acc | |
| But prevents Safari 10.1 from downloading ES5 scripts. | |
| This is the only way I know to detect "module" support in <head>. | |
| --> | |
| <script> | |
| // matrix of script sources. rows will be executed in order. | |
| // first column is ES6, the second is ES5. | |
| window.__SCRIPTS__ = [ |
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 cameraZ = camera.position.z; | |
| var planeZ = 5; | |
| var distance = cameraZ - planeZ; | |
| var aspect = viewWidth / viewHeight; | |
| var vFov = camera.fov * Math.PI / 180; | |
| var planeHeightAtDistance = 2 * Math.tan(vFov / 2) * distance; | |
| var planeWidthAtDistance = planeHeightAtDistance * aspect; | |
| // or |
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
| import { h, Component } from 'preact'; | |
| /** Creates a new store, which is a tiny evented state container. | |
| * @example | |
| * let store = createStore(); | |
| * store.subscribe( state => console.log(state) ); | |
| * store.setState({ a: 'b' }); // logs { a: 'b' } | |
| * store.setState({ c: 'd' }); // logs { c: 'd' } | |
| */ |
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
| import { Directive } from '@angular/core'; | |
| import { ViewController } from 'ionic-angular'; | |
| @Directive({ | |
| selector: '[hideTabs]' | |
| }) | |
| export class HideTabsDirective { | |
| constructor(private viewCtrl: ViewController) { | |
| // hide tabs when view loads |
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
| <!DOCTYPE html> | |
| <html> | |
| <head> | |
| <meta charset="utf-8"> | |
| <title>Test App</title> | |
| </head> | |
| <style> | |
| html, body { | |
| height: 100%; |
I have two Github accounts: oanhnn (personal) and superman (for work). I want to use both accounts on same computer (without typing password everytime, when doing git push or pull).
Use ssh keys and define host aliases in ssh config file (each alias for an account).
