An introduction to curl
using GitHub's API.
Makes a basic GET request to the specifed URI
curl https://api.github.com/users/caspyin
function( d ) { | |
// Create a copy of this date object | |
var target = new Date(d.valueOf()); | |
// ISO week date weeks start on monday | |
// so correct the day number | |
var dayNr = (d.getDay() + 6) % 7; | |
// Set the target to the thursday of this week so the |
An introduction to curl
using GitHub's API.
Makes a basic GET request to the specifed URI
curl https://api.github.com/users/caspyin
var translate = (function () { | |
var symbols = { | |
a: '([]+![])[+!+[]]', | |
b: '([]+{})[+!+[]+!+[]]', | |
c: '([]+{})[+!+[]+!+[]+!+[]+!+[]+!+[]]', | |
d: '([]+[][+[]])[+!+[]+!+[]]', | |
e: '([]+[][+[]])[+!+[]+!+[]+!+[]]', | |
f: '([]+[][+[]])[+!+[]+!+[]+!+[]+!+[]]', | |
g: '([]+([]+[])[([]+{})[+!+[]+!+[]+!+[]+!+[]+!+[]]+([]+{})[+!+[]]+([]+[][+!+[]])[+!+[]]+([]+![])[+!+[]+!+[]+!+[]]+([]+{})[+!+[]+!+[]+!+[]+!+[]+!+[]+!+[]]+([]+!![])[+!+[]]+([]+!![])[+!+[]+!+[]]+([]+{})[+!+[]+!+[]+!+[]+!+[]+!+[]]+([]+{})[+!+[]+!+[]+!+[]+!+[]+!+[]+!+[]]+([]+{})[+!+[]]+([]+!![])[+!+[]]])[+!+[]+!+[]+!+[]+!+[]+!+[]+!+[]+!+[]+!+[]+!+[]+!+[]+!+[]+!+[]+!+[]+!+[]]', | |
h: '(+!+[]+!+[]+!+[]+!+[]+!+[]+!+[]+!+[]+!+[]+!+[]+!+[]+!+[]+!+[]+!+[]+!+[]+!+[]+!+[]+!+[])[([]+{})[+!+[]+!+[]+!+[]+!+[]+!+[]+!+[]]+([]+{})[+!+[]]+([]+([]+[])[([]+{})[+!+[]+!+[]+!+[]+!+[]+!+[]]+([]+{})[+!+[]]+([]+[][+!+[]])[+!+[]]+([]+![])[+!+[]+!+[]+!+[]]+([]+{})[+!+[]+!+[]+!+[]+!+[]+!+[]+!+[]]+([]+!![])[+!+[]]+([]+!![])[+!+[]+!+[]] |
// USAGE ------ | |
// ============ | |
var shell = require('./shellHelper'); | |
// execute a single shell command | |
shell.exec('npm test --coverage', function(err){ | |
console.log('executed test'); | |
}}); |
error_reporting(E_ALL); | |
ini_set('error_reporting', E_ALL); | |
ini_set('display_errors',1); | |
const express = require("express"); | |
const router = express.Router(); | |
router.get('/', function (req, res) { | |
res.send("This is the '/' route in ep_app"); | |
}); | |
module.exports = router; |
I recently had the following problem:
We didn't want to open the MySQL port to the network, but it's possible to SSH from the Jenkins machine to the MySQL machine. So, basically you would do something like
ssh -L 3306:localhost:3306 remotehost
#/bin/bash | |
#-- Script to automate https://help.github.com/articles/why-is-git-always-asking-for-my-password | |
# Forked from the original to do the opposite: Switch ssh repo urls to https | |
# Original here: https://gist.github.com/m14t/3056747 | |
# Thanks to @m14t | |
#origin or upstream | |
REMOTE=${1-origin} | |
REPO_URL=`git remote -v | grep -m1 "^$REMOTE" | sed -Ene's#.*(git@github.com:[^[:space:]]*).*#\1#p'` |
function tryIt() { | |
var sheets = { | |
"1": { | |
"name": "type1", | |
"marker": "http://www.google.com/mapfiles/markerA.png" | |
}, | |
"2": { | |
"name": "type2", | |
"marker": "http://www.google.com/mapfiles/markerB.png" | |
}, |