Skip to content

Instantly share code, notes, and snippets.

View chrisns's full-sized avatar

Chris Nesbitt-Smith chrisns

View GitHub Profile
@chrisns
chrisns / cns.me DE-BS BOT 3000 🤖🤪.js
Last active September 10, 2024 10:03
cns.me DE-BS BOT 3000 🤖🤪 UserScript
// ==UserScript==
// @name cns.me DE-BS BOT 3000 🤖🤪
// @namespace http://tampermonkey.net/
// @version 2024-09-09
// @description Remove BS from register articles
// @author Chris Nesbitt-Smith
// @match https://www.theregister.com/*
// @icon https://www.google.com/s2/favicons?sz=64&domain=theregister.com
// @grant GM_xmlhttpRequest
// @connect localhost
@chrisns
chrisns / example.sh
Last active August 23, 2024 13:01
hisense udp remote
#!/bin/sh
# for example to go to the previous input option:
./hisense.py -d $IP_ADDRESS KEY_RETURNS KEY_HOME KEY_DOWN KEY_DOWN KEY_DOWN KEY_DOWN KEY_DOWN KEY_DOWN KEY_DOWN KEY_DOWN KEY_DOWN KEY_DOWN KEY_DOWN DELAY KEY_RIGHT KEY_OK
# note it gets stuck if it goes into anycast and no longer responds to UDP :(
#!/bin/bash
do_work() {
local dir=$1
local start_time=$2
local duration_to_keep=$3
cd $dir
rm -v trimmed_*.mp4 *.txt
for file in *.mp4; do
output_file="trimmed_$file"
@chrisns
chrisns / nginx.conf
Last active May 10, 2023 14:42
flip between internet explorer mode and edge
# site needs to be in the configurable list
# follow this guide: https://learn.microsoft.com/en-us/deployedge/edge-learnmore-configurable-sites-ie-mode
http {
server {
set $ieaction '';
if ( $http_x_internetexplorermodeconfigurable = 1) {
set $ieaction "configurable+${ieaction}";
}
if ($http_x_internetexplorermodeconfigurable != 1) {
@chrisns
chrisns / bigaddressbar.js
Last active March 10, 2022 09:28
big address bar for use in chrome with tampermonkey
// ==UserScript==
// @name Big address bar
// @namespace http://tampermonkey.net/
// @version 0.1
// @description presents a big address bar with ctrl+L
// @author You
// @match http://localhost/*
// @grant none
// @require https://code.jquery.com/jquery-3.6.0.slim.min.js
// ==/UserScript==
@chrisns
chrisns / googlejabramute.js
Last active January 24, 2022 12:48
google meet jabra button mapping
// ==UserScript==
// @name Jabra google meet mute button
// @namespace http://tampermonkey.net/
// @version 0.6
// @description google meet jabra mute button
// @author Chris Nesbitt-Smith
// @match https://meet.google.com/*
// @require https://code.jquery.com/jquery-3.6.0.slim.min.js
// @require https://cdn.jsdelivr.net/npm/@gnaudio/jabra-js@4.1.0/browser-umd/index.js
// @require https://cdnjs.cloudflare.com/ajax/libs/jquery-confirm/3.3.2/jquery-confirm.min.js
@chrisns
chrisns / cert-manager-issuers.yaml
Last active March 26, 2021 10:40
How to Expose Kubernetes Services on EKS with DNS and TLS
# ./k8s/cert-manager/issuers.yaml
---
apiVersion: cert-manager.io/v1
kind: ClusterIssuer
metadata:
name: letsencrypt-prod
spec:
acme:
email: user@example.com
server: https://acme-v02.api.letsencrypt.org/directory
@chrisns
chrisns / Dell5100cn.ppd
Created February 22, 2021 09:56
Dell 5100cn Printer driver
*PPD-Adobe: "4.3"
*% Adobe Systems PostScript(R) Printer Description File
*% Copyright 1987-1996 Adobe Systems Incorporated.
*% All Rights Reserved.
*% Permission is granted for redistribution of this file as
*% long as this copyright notice is intact and the contents
*% of the file is not altered in any way from its original form.
*% End of Copyright statement
*FileVersion: "1.0"
*FormatVersion: "4.3"
@chrisns
chrisns / getiamcreds.js
Last active June 28, 2019 13:23
get iam creds from metadata service
const http = require('http'); http.get("http://169.254.169.254/latest/meta-data/iam/security-credentials/", res => res.on("data", role => http.get(`http://169.254.169.254/latest/meta-data/iam/security-credentials/${role}`, res => res.on("data", (data, json=JSON.parse(data)) => console.log(`export AWS_ACCESS_KEY_ID=${json.AccessKeyId} AWS_SECRET_ACCESS_KEY=${json.SecretAccessKey} AWS_SESSION_TOKEN=${json.Token}`)))))
@chrisns
chrisns / install-k8s.ps1
Last active May 8, 2018 22:33
Install k8s and everything we need for a workshop
Set-ExecutionPolicy Bypass -Scope Process -Force; iex ((New-Object System.Net.WebClient).DownloadString('https://chocolatey.org/install.ps1'))
choco install -y atom
choco install -y bash --source cygwin
choco install -y curl
choco install -y docker
choco install -y docker-machine
choco install -y firefox
choco install -y git
choco install -y googlechrome