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
| 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 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
| <?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 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
| 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 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
| // 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', |
NewerOlder