Skip to content

Instantly share code, notes, and snippets.

View chapmanjacobd's full-sized avatar
🥅
goal_net

Jacob Chapman chapmanjacobd

🥅
goal_net
View GitHub Profile
Leave a comment with the name of an application (or multiple) that replaces a function typically done with a modern web browser.
I.E. an application that allows YouTube to be watched without a browser.
@chriswhong
chriswhong / scrape.js
Created April 22, 2019 03:58
Decrypting Amtrak's real-time train location geoJSON feed
// decrypting Amtrak's real-time train location geoJSON feed
// based on https://github.com/Vivalize/Amtrak-Train-Stats
const fetch = require('node-fetch');
const CryptoJS = require('crypto-js');
// this is the xhr call done by https://www.amtrak.com/track-your-train.html containing encrypted train location data
const dataUrl = 'https://maps.amtrak.com/services/MapDataService/trains/getTrainsData';
// these constants are pulled from RoutesList.v.json, which is an object with keys 'arr', 's', and 'v'
const sValue = '9a3686ac'; // found at s[8]
@vi
vi / split_by_silence.sh
Last active February 23, 2024 13:18
Using FFmpeg to split multimedia file into parts based on audio volume level
#!/bin/bash
IN=$1
OUT=$2
true ${SD_PARAMS:="-55dB:d=0.3"};
true ${MIN_FRAGMENT_DURATION:="20"};
export MIN_FRAGMENT_DURATION
if [ -z "$OUT" ]; then
@ctalkington
ctalkington / bulb_75w_rgbw_qpw06.yaml
Last active November 23, 2021 12:24
Merkury A21 75W Bulb ESPHome Config (requires v1.14+)
esphome:
name: bulb_75w_rgbw_qpw06
platform: ESP8266
board: esp01_1m
wifi:
ssid: 'YOURWIFISSID'
password: 'YOURWIFIPASSWORD'
logger:
@phizaz
phizaz / inspect-trained-model.ipynb
Last active September 12, 2023 20:31
Pytorch: Inspect Activations Layer-by-layer in Trained Model
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@karol-majewski
karol-majewski / fromEntries-with-literal-types.ts
Last active March 31, 2023 09:51
Type inference for literal types with Object.fromEntries
type Primitive =
| boolean
| number
| string
| bigint
| symbol
| null
| undefined;
type Narrowable =
(function () {
var param = 'fbclid';
if (location.search.indexOf(param + '=') !== -1) {
var replace = '';
try {
var url = new URL(location);
url.searchParams.delete(param);
replace = url.href;
} catch (ex) {
var regExp = new RegExp('[?&]' + param + '=.*$');
@fnky
fnky / ANSI.md
Last active May 14, 2025 19:15
ANSI Escape Codes

ANSI Escape Sequences

Standard escape codes are prefixed with Escape:

  • Ctrl-Key: ^[
  • Octal: \033
  • Unicode: \u001b
  • Hexadecimal: \x1B
  • Decimal: 27
@GAS85
GAS85 / split_tunnel_VPN.md
Last active October 4, 2024 12:58
Force Torrent/user Traffic through VPN Split Tunnel on Ubuntu 16.04