Look at LSB init scripts for more information.
Copy to /etc/init.d:
# replace "$YOUR_SERVICE_NAME" with your service's name (whenever it's not enough obvious)| #!/usr/bin/env ruby | |
| # Usage: gitio URL [CODE] | |
| # | |
| # Turns a github.com URL | |
| # into a git.io URL | |
| # | |
| # Copies the git.io URL to your clipboard. | |
| url = ARGV[0] | |
| code = ARGV[1] |
| This playbook has been removed as it is now very outdated. |
Look at LSB init scripts for more information.
Copy to /etc/init.d:
# replace "$YOUR_SERVICE_NAME" with your service's name (whenever it's not enough obvious)The question: how can we use ES6 modules in Node.js, where modules-as-functions is very common? That is, given a future in which V8 supports ES6 modules:
export syntax, without breaking consumers that do require("function-module")()?import syntax, while not demanding that the module author rewrites his code to ES6 export?@wycats showed me a solution. It involves hooking into the loader API to do some rewriting, and using a distinguished name for the single export.
This is me eating crow for lots of false statements I've made all over Twitter today. Here it goes.
| var request = require('supertest'), | |
| should = require('should'), | |
| app = require('../server'); | |
| var Cookies; | |
| describe('Functional Test <Sessions>:', function () { | |
| it('should create user session for valid user', function (done) { | |
| request(app) | |
| .post('/v1/sessions') |
| ;;; stupid-indent-mode.el --- Plain stupid indentation minor mode | |
| ;; Copyright (C) 2013 Mihai Bazon | |
| ;; Author: Mihai Bazon <[email protected]> | |
| ;; Keywords: | |
| ;; This program is free software; you can redistribute it and/or modify | |
| ;; it under the terms of the GNU General Public License as published by | |
| ;; the Free Software Foundation, either version 3 of the License, or |
| (function () { | |
| var i, elements = document.querySelectorAll('body *'); | |
| for (i = 0; i < elements.length; i++) { | |
| if (getComputedStyle(elements[i]).position === 'fixed') { | |
| elements[i].parentNode.removeChild(elements[i]); | |
| } | |
| } | |
| })(); |
| ;;;; Last modified: 2013-09-18 20:24:02 tkych | |
| ;; This script is in the public domain. | |
| ;; Latest version is available at https://gist.github.com/tkych/6509285 | |
| ;;==================================================================== | |
| ;; Radiation Monitor for Fukushima Daiichi Nuclear Power Station | |
| ;;==================================================================== | |
| ;; |
| - name: Testing variables with SUDO=NO | |
| hosts: "*" | |
| sudo: no | |
| tasks: | |
| - name: "PLAYBOOK SUDO=NO, TASK SUDO=NO" | |
| command: whoami | |
| register: whoami_output | |
| sudo: no | |
| - debug: var=whoami_output.stdout |
| /** | |
| * Fancy ID generator that creates 20-character string identifiers with the following properties: | |
| * | |
| * 1. They're based on timestamp so that they sort *after* any existing ids. | |
| * 2. They contain 72-bits of random data after the timestamp so that IDs won't collide with other clients' IDs. | |
| * 3. They sort *lexicographically* (so the timestamp is converted to characters that will sort properly). | |
| * 4. They're monotonically increasing. Even if you generate more than one in the same timestamp, the | |
| * latter ones will sort after the former ones. We do this by using the previous random bits | |
| * but "incrementing" them by 1 (only in the case of a timestamp collision). | |
| */ |