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
| set autoindent | |
| set indicator | |
| set linenumbers | |
| set tabsize 4 | |
| set tabstospaces | |
| set trimblanks | |
| include "/usr/share/nano/*.nanorc" | |
| extendsyntax python tabgives " " | |
| bind ^C copy main |
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
| class Cache { | |
| constructor() { | |
| this.cache = {}; | |
| this.timeouts = {}; | |
| } | |
| set(key, value, ttl) { | |
| this.cache[key] = value; | |
| if (ttl) { | |
| // instead of using timeouts it could validate the ttl when `get` is called | |
| // so the amount of timeouts doesn't get out of control |
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
| First there would be optimistic update actions when posting the data to the backend service. These would be linked together by some process ID in meta data. | |
| ``` | |
| { type: VM_POST, payload: vmDataOnClient } | |
| { type: VM_POST_ERROR, payload: someError } | |
| { type: VM_POST_SUCCESS, payload: vmDataFromServer } | |
| ``` | |
| Then streaming data would come from the web server with progress of the VM deployment on the hypervisor. These would be linked together by the VM ID, since the VM is the thing they have in common. | |
| ``` | |
| { type: VM_DEPLOY_START, payload: vmId } // VM added to deployment progress store |
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
| <?php | |
| global $requirejsDeps; | |
| $requirejsDeps = array(); | |
| function smarty_function_requirejs($params, &$smarty) | |
| { | |
| global $requirejsDeps; | |
| // if finishing and something has been required, do it |
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
| { | |
| "name": "my/example", | |
| "description": "an example", | |
| "license": "gpl", | |
| "require": { | |
| "vmwarephp/vmwarephp": "dev-master" | |
| }, | |
| "autoload": { | |
| "classmap": [ | |
| "vendor/vmwarephp/vmwarephp/library" |
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 spin = function() { | |
| var s = '|/-\\'; | |
| if (isNaN(this.i) || ++this.i > s.length - 1) { | |
| this.i = 0; | |
| } | |
| return s[this.i]; | |
| } |
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 twitter = require('ntwitter'); | |
| var clc = require('cli-color'); | |
| var twit = new twitter({ | |
| consumer_key: 'key', | |
| consumer_secret: 'secret', | |
| access_token_key: 'key', | |
| access_token_secret: 'secret' | |
| }); |