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
// npm install githubhook | |
const githubhook = require('githubhook'); | |
const exec = require('child_process').exec; | |
let config = { | |
ip: '0.0.0.0', | |
port: 1234, | |
url: '/push', | |
secret: 'whatever', | |
branch: 'master', |
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
const http = require('http'); | |
const https = require('https'); | |
const fs = require('fs'); | |
const path = require('path'); | |
const url = require('url'); | |
const exec = require('child_process').execSync; | |
const jq = require('jquery'); | |
const jsdom = require('jsdom'); | |
const SAVE_DIR = path.dirname(__filename)+'/scrape'; |
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
<?php | |
function sh ($cmd, $cwd) { | |
$descriptorspec = array( | |
1 => array('pipe', 'w'), // stdout is a pipe that the child will write to | |
2 => array('pipe', 'w') // stderr | |
); | |
$resource = proc_open($cmd, $descriptorspec, $pipes, $cwd); | |
if (is_resource($resource)) { | |
$output = stream_get_contents($pipes[2]); | |
$output .= PHP_EOL; |
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
const readline = require('readline'); | |
const colors = require('colors'); | |
const rl = readline.createInterface({ | |
input: process.stdin, | |
}); | |
let line = 1, warn = 0; | |
rl.on('line', (ln) => { | |
if (ln.length > 80) console.warn(('#'+(++warn)+' ').red.bold |
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
cross(w, e). | |
cross(e, w). | |
execmove([F, W, G, C], 0, [NF, NW, NG, NC]) :- F = W, | |
cross(F, NF), | |
cross(W, NW), | |
NG = G, | |
NC = C. | |
execmove([F, W, G, C], 1, [NF, NW, NG, NC]) :- F = G, | |
cross(F, NF), |
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
class Boost < Formula | |
desc "Collection of portable C++ source libraries" | |
homepage "https://www.boost.org/" | |
url "https://dl.bintray.com/boostorg/release/1.69.0/source/boost_1_69_0.tar.bz2" | |
sha256 "8f32d4617390d1c2d16f26a27ab60d97807b35440d45891fa340fc2648b04406" | |
head "https://github.com/boostorg/boost.git" | |
bottle do | |
cellar :any | |
end |
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
#include <unistd.h> | |
#include <getopt.h> | |
#include <stdio.h> | |
const struct option longopts[] = { | |
{"chdir", no_argument, NULL, 'd'}, | |
{"noclose", no_argument, NULL, 'n'}, | |
{"log-stdout", required_argument, NULL, '1'}, | |
{"log-stderr", required_argument, NULL, '2'}, | |
{0, 0, 0, 0} |
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 decode(s) { | |
const len = s.length; | |
const apad = 'abcdefghijklmnopqrstuvwxy1234567z'; | |
let v,x,r=0,bits=0,c,o=''; | |
s = s.toUpperCase(); | |
for(i=0;i<len;i+=1) { | |
v = apad.indexOf(s.charAt(i)); | |
if (v>=0 && v<32) { |
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
const zero = '+[]'; // 1 | |
const one = '+!![]'; // 1 | |
const two = '('+ one + one +')'; // 2 | |
const three = '('+ one + one + one +')'; // 3 | |
const four = '('+ one + one + '<<' + one +')'; // 3 | |
const five = '('+ four + one +')'; // 4 | |
const six = '('+ one + one + one + '<<' + one +')'; // 4 | |
const seven = '('+ six + one +')'; | |
const eight = '('+ one + one + '<<' + one + one +')'; // 4 | |
const int_lits = {0: zero, 1: one, 2: two, 3: three, 4: four, 5: five, 6: six, 7: seven, 8: eight}; |
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
const key = 0x90; | |
function protect_email(email) { | |
bytes = [] | |
for (char of email) { | |
bytes.push(String.fromCharCode(char.charCodeAt(0) ^ key)); | |
} | |
return btoa(bytes.join('')); | |
} |
OlderNewer