Skip to content

Instantly share code, notes, and snippets.


Peter Cunha petercunha

View GitHub Profile

Keybase proof

I hereby claim:

  • I am petercunha on github.
  • I am petercunha ( on keybase.
  • I have a public key whose fingerprint is 355B F540 0528 11C0 84F0 08F7 DCBE 5DAB 7C6A 7188

To claim this, I am signing this object:

petercunha / webpack.config.js
Last active Feb 18, 2017 — forked from learncodeacademy/webpack.config.js
Sample Basic Webpack Config
View webpack.config.js
var debug = process.env.NODE_ENV !== "production";
var webpack = require('webpack');
var path = require('path');
module.exports = {
context: __dirname,
devtool: debug ? "inline-sourcemap" : null,
entry: "./js/scripts.js",
output: {
path: path.join(__dirname, "/js"),
petercunha / WolframAPI.js
Created Feb 18, 2017
Wolfram API Query for don don
View WolframAPI.js
var request = require('request');
function wolframQuery(query) {
var options = {
url: '<! PUT YOUR API KEY HERE !>&i=' + encodeURI(query),
headers: {}
function callback(error, response, body) {
if (!error && response.statusCode == 200) {
petercunha / Hydra.txt
Last active Mar 19, 2019
Hydra SSH cracking script
View Hydra.txt
Crack SSH logins with a username, password, and host list. Output JSON to file.
`hydra -o (outputfile) -b json -f -I -L (userlist) -P (passlist) -u -s 22 -M (hostlist) ssh`
petercunha / import.js
Last active Apr 3, 2019
Script to aid in parsing Collection #1
View import.js
// Reads in email:password file "input.txt" and converts it into JSON "output.json" for easy MongoDB import.
const readline = require('readline')
const fs = require('fs')
const writeStream = fs.createWriteStream('output.json')
let line_no = 0
let invalid = 0
let rl = readline.createInterface({
input: fs.createReadStream('input.txt')