Skip to content

Instantly share code, notes, and snippets.

View davericher's full-sized avatar

Dave Richer davericher

View GitHub Profile
@davericher
davericher / updatePort.js
Last active September 28, 2015 03:52
A node script to get forwarded private internet access port, write it to your transmission settings, and restart transmission
#!/usr/bin/env node
var os = require('os');
var fs = require('fs');
var curl = require('curlrequest'); // Required via npm
var shelljs = require('shelljs'); // Required via npm
var jsonfile = require('jsonfile'); // Required via npm
// Transmission-daemon settings.json file
var transFile = '/etc/transmission-daemon/settings.json';
// Private internet access username
// David Richer - Shopify challenge Winternship 2015
'use strict';
var request = require("request"); // run npm install request
request({
// Shopify JSON feed
url: 'http://shopicruit.myshopify.com/products.json',
json: true // the response will be json
}, function (err, response, items) {
@davericher
davericher / phantom-footer.js
Created November 23, 2020 19:42 — forked from alapini/phantom-footer.js
Phantom js print header and footer