Skip to content

Instantly share code, notes, and snippets.

Robbie Trencheny robbiet480

Block or report user

Report or block robbiet480

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@robbiet480
robbiet480 / Collect_Instagram_Ad_Interests.js
Created Jun 20, 2019
A lil script to collect all of your Instagram ad interests automatically so you don't have to keep clicking "Show More".
View Collect_Instagram_Ad_Interests.js
// 1. On your computer, go to https://www.instagram.com/accounts/access_tool/ads_interests
// 2. Open dev tools by right clicking on the page and selecting "Inspect"
// 3. Click Console
// 4. Paste the following code
// 5. Hit enter
// 6. Wait
// 7. It will print out your list of interests once its done.
var allInterests = [];
@robbiet480
robbiet480 / swift4-icons.stencil
Created May 15, 2019
A SwiftGen template for generating icon enums and helpers.
View swift4-icons.stencil
// swiftlint:disable all
// Generated using SwiftGen — https://github.com/SwiftGen/SwiftGen
import UIKit
{% if families %}
{% set accessModifier %}{% if param.publicAccess %}public{% else %}internal{% endif %}{% endset %}
{% for family in families %}
{% set enumName %}{{param.enumName|default:family.name}}{% endset %}
/** A wrapper class for Objective-C compatibility. */
@robbiet480
robbiet480 / extract_watch_image_sizes.js
Created Oct 1, 2018
Extract image dimensions from the watchOS HIG
View extract_watch_image_sizes.js
// Run this on https://developer.apple.com/design/human-interface-guidelines/watchos/icons-and-images/complication-images/
function pascalCase(str) {
var fixed = str.replace(/(\w)(\w*)/g, function(g0,g1,g2){return g1.toUpperCase() + g2.toLowerCase();}).split(' ').join('');
if(fixed.indexOf('(') > -1) {
fixed = fixed.substring(0, fixed.indexOf('('));
}
return fixed;
}
@robbiet480
robbiet480 / Dehydrated_FreeNAS.py
Last active Jul 23, 2018
A script to install Lets Encrypt certificates generated by Dehydrated into FreeNAS
View Dehydrated_FreeNAS.py
#!/usr/local/bin/python
"""
Import and activate a SSL/TLS certificate generated by dehydrated.sh into FreeNAS 11.1 or later
Uses the FreeNAS API to make the change, so everything's properly saved
in the config database and captured in a backup.
Requires paths to the cert (including the any intermediate CA certs) and
private key, and username, password, and FQDN of your FreeNAS system.
View cf_airports.json
[
{
"name": "Nazran, Russia (%u0)",
"key": "%u0",
"latitude": "43.323815",
"longitude": "45.017761"
},
{
"name": "Youngstown, United States (04G)",
"key": "04G",
View airports.json
This file has been truncated, but you can view the full file.
[
{
"key": "UTK",
"longitude": "169.86667",
"iso": "MH",
"status": 1,
"name": "Utirik Airport",
"continent": "OC",
"type": "airport",
@robbiet480
robbiet480 / Sample a Motorola SB6121 Surfboard's Signal
Created Apr 30, 2017 — forked from chaimpeck/Sample a Motorola SB6121 Surfboard's Signal
This script is meant to be run with the Motorola SB6121 Surfboard Modem.
View Sample a Motorola SB6121 Surfboard's Signal
#!/usr/bin/env python
"""
Sample a Motorola Surfboard modem's signal.
This script is meant to be run with the Motorola SB6121 Surfboard Modem.
If you run it on a different modem, it might not work, but it's worth a try...
It should be run as a cron job, every minute (or whatever interval you'd like)
into a text file. The file can later be used by a json parser to analyze the
View test_hsb_conversion.py
import colorsys
def hsb2rgb(hsb):
'''
Transforms a hsb array to the corresponding rgb tuple
In: hsb = array of three ints (h between 0 and 360, s and v between 0 and 100)
Out: rgb = array of three ints (between 0 and 255)
'''
H = float(hsb[0] / 360.0)
S = float(hsb[1] / 100.0)
@robbiet480
robbiet480 / pairserver.py
Last active Feb 4, 2017
A Python 3/asyncio implementation of DACP discovery and pairing for use with iTunes or Apple TV (tested on aTV Generation 4)
View pairserver.py
import asyncio
import aiohttp
from aiohttp import web
from zeroconf import ServiceInfo, ServiceBrowser, Zeroconf
import socket
import struct
import random
import hashlib
View RemoveShipForMacWebhooks.js
// Delete webhooks created by Real Artists Ship
// Author: Robbie Trencheny
// License: MIT
// Run npm install github first
// Must set GITHUB_TOKEN environment variable
var GitHubApi = require("github");
var github = new GitHubApi();
You can’t perform that action at this time.