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
mkdir ~/app-root/data/tmp | |
mysqldump -h $OPENSHIFT_MYSQL_DB_HOST -P ${OPENSHIFT_MYSQL_DB_PORT:-3306} -u ${OPENSHIFT_MYSQL_DB_USERNAME:-'admin'} --password="$OPENSHIFT_MYSQL_DB_PASSWORD" --all-databases > ~/app-root/data/tmp//all.sql |
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
@GrabConfig(systemClassLoader=true) | |
@GrabResolver(name='org.climatic', root='http://dl.bintray.com/content/climatic/climatic') | |
@Grab('com.sun.jersey:jersey-core:1.10') | |
@Grab('com.sun.jersey:jersey-client:1.10') | |
@Grab('com.sun.jersey.contribs.jersey-oauth:oauth-signature:1.10') | |
@Grab('com.sun.jersey.contribs.jersey-oauth:oauth-client:1.10') | |
@Grab('org.climatic:climatic-core:0.1.2') | |
import com.sun.jersey.api.client.Client | |
import com.sun.jersey.api.client.ClientResponse |
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
[email protected]:[Gist ID].git |
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
<html> | |
<head> | |
<script src="http://cdnjs.cloudflare.com/ajax/libs/three.js/r61/three.min.js"></script> | |
</head> | |
<body> | |
<script> | |
var camera, scene, renderer; | |
var geometry, material; | |
var meshes = []; |
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
//cmd.js | |
exports.invoke = function(shell, options) { | |
shell.emit('async', function(resume) { | |
someAsyncFn(function(result){ | |
shell.log(result); | |
resume(); | |
}); | |
//app.js |
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
//app.js | |
var readline = require('readline'), rl = null, .... | |
function startRl() { | |
rl = readline.createInterface(process.stdin, process.stdout); | |
rl.setPrompt('> '); | |
rl.on('line', function (userInput) { | |
shell.execute(userInput); | |
rl.prompt(); |
Some npm
packaged scripts are written as frameworks that dynamically require
user node scripts, e.g. the gulp
CLI script require
s the user provided Gulpfile.js
(by default).
To write .js
using ES6 syntax is problematic; if the $PATH script for a framework x
looks like
#!/usr/bin/env node
var x = require('x');
...
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
alert('A bookmarlet'); |
OlderNewer