Skip to content

Instantly share code, notes, and snippets.

View chrisns's full-sized avatar

Chris Nesbitt-Smith chrisns

View GitHub Profile
@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
DEVICE=INTERFACE
BOOTPROTO=dhcp
ONBOOT=yes
TYPE=Ethernet
@chrisns
chrisns / updateSecret.sh
Last active January 14, 2020 12:35 — forked from 6be709c0/updateSecret.sh
A simple command to finally update the docker secret !
#!/usr/bin/env bash
# HOW TO USE
# based on https://gist.github.com/MLescaudron/e8248d32d3a5b8caaf622c1a829cf067
# ./updateSecret.sh secretName newFile
# It's that simple !
if [ "$#" -ne 2 ];
then
echo "#####"
@chrisns
chrisns / keybase.md
Created September 1, 2016 18:05
keybase.md

Keybase proof

I hereby claim:

  • I am chrisns on github.
  • I am chrisns (https://keybase.io/chrisns) on keybase.
  • I have a public key whose fingerprint is 0CA7 788D F20B 665C 3934 6704 B342 25DF 4F8C 89E0

To claim this, I am signing this object: