This file contains 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
while [[ $# -gt 0 ]] && [[ ."$1" = .-* ]] ; | |
do | |
opt="$1"; | |
shift; #expose next argument | |
case "$opt" in | |
"--" ) break 2;; | |
"-b" ) | |
BRANCH_PATH="$1"; shift;; | |
"-branch" ) # alternate format | |
BRANCH_PATH="$1"; shift;; |
This file contains 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
module['exports'] = function bot (hook) { | |
var request = require('request'); | |
var TOKEN = hook.env.bot_scheduler_token; | |
var ENDPOINT = 'https://api.telegram.org/bot' + TOKEN; | |
console.log(hook.params); | |
// generic handler to log api call responses | |
var handler = function (err, httpResponse, body) { | |
var response = JSON.stringify({ |
This file contains 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 cv2 | |
import numpy as np | |
from matplotlib import pyplot as plt | |
img = cv2.imread('image.jpg', cv2.IMREAD_GRAYSCALE) | |
def compute_skew(image): | |
image = cv2.bitwise_not(image) | |
height, width = image.shape |
This file contains 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 githubapi = require("github"), | |
async = require("async"), | |
AWS = require('aws-sdk'), | |
secrets = require('./secrets.js'); | |
// the 'handler' that lambda calls to execute our code | |
exports.handler = function(event, context) { | |
// config the sdk with our credentials | |
// http://docs.aws.amazon.com/AWSJavaScriptSDK/guide/node-configuring.html |
Locate the section for your github remote in the .git/config
file. It looks like this:
[remote "origin"]
fetch = +refs/heads/*:refs/remotes/origin/*
url = [email protected]:joyent/node.git
Now add the line fetch = +refs/pull/*/head:refs/remotes/origin/pr/*
to this section. Obviously, change the github url to match your project's URL. It ends up looking like this:
This file contains 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
function getJSON(aUrl,sheetname) { | |
//var sheetname = "test"; | |
//var aUrl = "http://pipes.yahoo.com/pipes/pipe.run?_id=286bbb1d8d30f65b54173b3b752fa4d9&_render=json"; | |
var response = UrlFetchApp.fetch(aUrl); // get feed | |
var dataAll = JSON.parse(response.getContentText()); // | |
var data = dataAll.value.items; | |
for (i in data){ | |
data[i].pubDate = new Date(data[i].pubDate); | |
data[i].start = data[i].pubDate; | |
} |