Skip to content

Instantly share code, notes, and snippets.

View vitorio's full-sized avatar

Vitorio Miliano vitorio

View GitHub Profile
@vitorio
vitorio / abogado
Created April 17, 2020 05:06
Palindromains! Palindromic domain names from new gTLDs. Uses the Domainr API through RapidAPI.
abogado
abogado, zuerich; lookup; SKIPPING
abogado, zone; lookup; lookup; abogado.zone / zone.abogado
abogado, zip; lookup; SKIPPING
abogado, zero; lookup; SKIPPING
abogado, yun; lookup; lookup; SKIPPING
abogado, you; lookup; SKIPPING
abogado, yokohama; lookup; lookup; abogado.yokohama / yokohama.abogado
abogado, yoga; lookup; lookup; SKIPPING
abogado, yachts; lookup; lookup; abogado.yachts / yachts.abogado
@vitorio
vitorio / osx-libnfc-latest-homedir.md
Created July 28, 2018 01:42
Compiling libnfc (latest) natively on OS X within your home directory

These instructions compile a native OS X version of libnfc (latest, from source control) that lives in your home directory, and which cannot be moved around, but should always be discoverable by applications.

Assumes OS X with Xcode or Xcode command-line tools, not macports or homebrew

To install Xcode command-line tools in recent versions of OS X, open Terminal, type xcode-select --install and click "Install"

Older versions of OS X may need to manually download disk images of older versions of Xcode and/or the Xcode command-line tools, as various certificates may have expired (e.g. 10.7.4 requires a manual install from the Xcode 4.6.2 command-line tools image)

Download latest pkg-config (tested with 0.29.1) from https://pkg-config.freedesktop.org/releases/?C=M;O=D

@vitorio
vitorio / dump-storify-json.py
Created April 29, 2018 23:40
Given a Storify username, write <username>.json, a <username> folder, and a <username>/<storify-slug>.json for each story
#!/usr/bin/python
try:
import simplejson as json
except:
import json
import requests
import math
import sys
import os
import errno
@vitorio
vitorio / dump-storify-static-urls.py
Last active April 29, 2018 23:19
Given a Storify username, write the static HTML export URLs for each public story to stdout
#!/usr/bin/python
try:
import simplejson as json
except:
import json
import requests
import math
import sys
import os
@vitorio
vitorio / scrape-storify-stories.py
Last active December 28, 2017 22:47 — forked from igorbrigadir/scrape-storify-stories.py
Download all Storify stories for a given user
#!/usr/bin/python
try:
import simplejson as json
except:
import json
import requests
import math
import sys
import argparse as ap
@vitorio
vitorio / osx-rpiboot-homedir.md
Last active January 4, 2023 19:10
Compiling libusb and rpiboot natively on OS X within your home directory

NOTE: rpiboot doesn't actually work on recent OS X versions and/or Macs due to a bug in the RPi0/RPi1 chipset: https://www.raspberrypi.org/forums/viewtopic.php?f=98&t=90825

These instructions compile a native OS X version of rpiboot that lives in your home directory, and which cannot be moved around, but should always be discoverable by applications.

Assumes OS X with Xcode or Xcode command-line tools, not macports or homebrew

To install Xcode command-line tools in recent versions of OS X, open Terminal, type xcode-select --install and click "Install"

Older versions of OS X may need to manually download disk images of older versions of Xcode and/or the Xcode command-line tools, as various certificates may have expired (e.g. 10.7.4 requires a manual install from the Xcode 4.6.2 command-line tools image)

@vitorio
vitorio / pacman.js
Created March 12, 2017 09:04
ES5- and ES6-injecting shims for PhantomJS Emularity test, shims from https://github.com/es-shims/es5-shim and http://stackoverflow.com/a/38471938
//
//
// Script to run against emulator/emularity pages to do screengrabs.
//
var webPage = require('webpage');
var page = webPage.create();
page.onConsoleMessage = function(msg, lineNum, sourceId) {
console.log('CONSOLE: ' + msg + ' (from line #' + lineNum + ' in "' + sourceId + '")');
@vitorio
vitorio / trynumber.py
Created September 20, 2016 18:06
Manually search for matching local and toll-free Twilio numbers
import twilio
twilio_account_sid = ""
twilio_auth_token = ""
client = twilio.rest.TwilioRestClient(twilio_account_sid, twilio_auth_token)
## By default, Twilio will give you a selection of 30 numbers,
## so you want to search through a variety of patterns to find more
def trynumber(n):
numbers = client.phone_numbers.search(area_code="###", country="US", contains=n)
@vitorio
vitorio / osx-libmagic-homedir.md
Last active February 14, 2019 21:19
Compiling libmagic and libmagic python bindings natively on OS X within your home directory

These instructions compile a native OS X version of libmagic and the libmagic python binding, which use the system magic database, that live in your home directory, and which cannot be moved around, but which should always be discoverable by applications.

Assumes OS X with Xcode or Xcode command-line tools, not macports or homebrew

To install Xcode command-line tools in recent versions of OS X, open Terminal, type xcode-select --install and click "Install"

Older versions of OS X may need to manually download disk images of older versions of Xcode and/or the Xcode command-line tools, as various certificates may have expired (e.g. 10.7.4 requires a manual install from the Xcode 4.6.2 command-line tools image)

Download Apple's latest modified file 5.04 (used in 10.7+) from http://opensource.apple.com/tarballs/file/file-47.tar.gz

@vitorio
vitorio / osx-libmagic-movable.md
Last active August 28, 2016 17:01
Compiling libmagic and libmagic python bindings natively on OS X for use in any directory

These instructions compile a native OS X version of libmagic and the libmagic python binding which use the system magic database, and adjust their internal paths to allow you to use them from any arbitrary working directory, which is normally restricted in versions of OS X with System Integrity Protection.

Assumes OS X with Xcode or Xcode command-line tools, not macports or homebrew

To install Xcode command-line tools in recent versions of OS X, open Terminal, type xcode-select --install and click "Install"

Older versions of OS X may need to manually download disk images of older versions of Xcode and/or the Xcode command-line tools, as various certificates may have expired (e.g. 10.7.4 requires a manual install from the Xcode 4.6.2 command-line tools image)

Download Apple's latest modified file 5.04 (used in 10.7+) from http://opensource.apple.com/tarballs/file/file-47.tar.gz