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 = []; |
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. */ |
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; | |
} |
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", |
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) |
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(); |
NewerOlder