Skip to content

Instantly share code, notes, and snippets.

View petercunha's full-sized avatar

Peter Cunha petercunha

View GitHub Profile

Keybase proof

I hereby claim:

  • I am petercunha on github.
  • I am petercunha (https://keybase.io/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
petercunha / webpack.config.js
Last active February 18, 2017 18:23 — forked from learncodeacademy/webpack.config.js
Sample Basic Webpack Config
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
petercunha / WolframAPI.js
Created February 18, 2017 21:48
Wolfram API Query for don don
var request = require('request');
function wolframQuery(query) {
var options = {
url: 'https://api.wolframalpha.com/v1/result?appid=<! PUT YOUR API KEY HERE !>&i=' + encodeURI(query),
headers: {}
};
function callback(error, response, body) {
if (!error && response.statusCode == 200) {
console.log(body);
@petercunha
petercunha / Hydra.txt
Last active March 19, 2019 20:38
Hydra SSH cracking script
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
petercunha / import.js
Last active April 3, 2019 13:49
Script to aid in parsing Collection #1
// 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')