Skip to content

Instantly share code, notes, and snippets.

🙇
slingin code

Pat onpaws

Block or report user

Report or block onpaws

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
@onpaws
onpaws / manifests.yaml
Created May 12, 2019
Fixed manifests for parity 2.5.0
View manifests.yaml
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
namespace: default
name: pv-default-100g-disk01
annotations:
volume.beta.kubernetes.io/storage-class: default
spec:
accessModes:
- ReadWriteOnce
@onpaws
onpaws / parity-2.x-kubes.yaml
Created May 11, 2019
Start with DDorgan's manifests; upgrade Parity to v2.5.0
View parity-2.x-kubes.yaml
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
namespace: default
name: pv-default-100g-disk01
annotations:
volume.beta.kubernetes.io/storage-class: default
spec:
accessModes:
- ReadWriteOnce
View fibonacci.js
function fib(n) {
if (n < 2) return n;
return fib(n-1) + fib(n-2);
}
@onpaws
onpaws / ideas.md
Last active Jan 16, 2019
Thoughts on Digitizer mutation & async behavior
View ideas.md
@onpaws
onpaws / makearray.js
Created Dec 14, 2018
Array one liner
View makearray.js
Array.from({ length: 10 }, (_,i) => i)
View SendEmailSnippet.js
{
"m": 0,
"i": 0,
"n": "SendEmail",
"o": "{\"OperatorId\":1,\"OperatorName\":\"DevTestOperator\",\"TemplateName\":\"WithdrawConfirmation\",\"Language\":\"EN\",\"FromAddress\":\"nobody@alphapoint.com\",\"ReplyTo\":\"\",\"Function\":\"WithdrawConfirmation\",\"DateTimeFormat\":\"\",\"DefaultTimeZone\":\"\",\"IsEnabled\":true,\"ToAddresses\":[\"gabriel.plewa@alphapoint.com\"],\"BccAddresses\":[],\"TemplateTokens\":{\"WebsiteURL\":\"\",\"AjaxURL_B64\":\"\",\"UserName\":\"admin\",\"CompanyName\":\"DevTestOperator\",\"IPAddress\":\"::1\",\"Time\":\"Thursday October 25, 2018 4:52:30 Z\"},\"Template\":null,\"Subject\":null}"
}
{
"OperatorId": 1,
"OperatorName": "DevTestOperator",
@onpaws
onpaws / gist:df529d6a1f87ceb8cb95f15d37a96306
Created Oct 16, 2018
VSTS / aka Azure DevOps override env vars
View gist:df529d6a1f87ceb8cb95f15d37a96306
$LowerCaseBuildRepositoryName = "$(Build.Repository.Name)".ToLower()
Write-Output ("##vso[task.setvariable variable=Build.Repository.Name;]$LowerCaseBuildRepositoryName")
Write-Host "Build.Repository.Name variable updates"
#via http://normalian.hatenablog.com/entry/2018/03/29/073622
@onpaws
onpaws / gist:c8ada6f8fa614d926a5572613888123f
Last active Oct 9, 2018
Issue upgrading to cert-manager 0.5
View gist:c8ada6f8fa614d926a5572613888123f
Back in August I installed cert-manager 0.4 using helm, and tonight was hoping to upgrade to 0.5.
First thing I did was check the cert-manager docs and found a section about my specific upgrade scenario (0.4->0.5)
http://docs.cert-manager.io/en/latest/admin/upgrading/upgrading-0.4-0.5.html
The docs say:
"Before upgrading, you should add the certmanager.k8s.io/disable-validation: "true" annotation to the cert-manager namespace."
Here are my namespaces, I don't have one literally called 'cert-manager' so I think they mean "default". (right?)
$ kubectl get namespace cert-manager
Error from server (NotFound): namespaces "cert-manager" not found
@onpaws
onpaws / switch-node-version.sh
Last active Sep 19, 2018
Homebrew and old versions
View switch-node-version.sh
$ brew list --versions node
node 10.1.0 9.11.1 10.0.0
$ brew switch node 9.11.1
Cleaning /usr/local/Cellar/node/10.1.0
Cleaning /usr/local/Cellar/node/9.11.1
Cleaning /usr/local/Cellar/node/10.0.0
7 links created for /usr/local/Cellar/node/9.11.1
@onpaws
onpaws / CORS and WebSocket test
Last active Nov 27, 2017
Go to any https page and paste this into the JavaScript console
View CORS and WebSocket test
# Secure
const wss = new WebSocket('wss://demos.kaazing.com/echo')
wss.onmessage = (msg) => console.log(msg)
setTimeout(() => wss.send('ping'), 1000)
# Standard
const ws = new WebSocket('ws://demos.kaazing.com/echo')
ws.onmessage = (msg) => console.log(msg)
setTimeout(() => ws.send('insecure ping'), 1000)
You can’t perform that action at this time.