Skip to content

Instantly share code, notes, and snippets.

Avatar

Ruben Martinez Jr. rubencodes

View GitHub Profile
@rubencodes
rubencodes / google.js
Last active May 10, 2018
Find valid .google domains
View google.js
// I ran this with:
// while true; do node ~/Desktop/google.js --max_old_space_size=4096 --optimize_for_size --max_executable_size=4096 --stack_size=4096 && break; done
// This will run the script with 4GB allocated memory, and auto-restart if it crashes (happens sometimes due to out of memory).
const https = require('https');
const fs = require('fs');
// File storage between runs.
const validStorage = '/Users/ruben/Desktop/validURLs.txt';
const attemptsStorage = '/Users/ruben/Desktop/attempts.txt';
@rubencodes
rubencodes / .bash_rc
Created Sep 15, 2016
Google Search CLI
View .bash_rc
#Begin GoogleSearch CLI for Mac
function google() {
if [ $1 = "--images" ]; then
open https://google.com/search?tbm=isch\&q="$2"
elif [ $1 = "--news" ]; then
open https://google.com/search?tbm=nws\&q="$2"
else
open https://google.com/search?q="$1"
fi
}
@rubencodes
rubencodes / console.log in Swift
Last active Nov 13, 2015
Force of habit: I keep trying to use console.log in Swift, to no avail. No longer!
View console.log in Swift
class console {
class func log(arg : Any) {
print(arg)
}
}
console.log("Hello World!")
You can’t perform that action at this time.