I hereby claim:
- I am mcharo on github.
- I am mcharo (https://keybase.io/mcharo) on keybase.
- I have a public key whose fingerprint is 8FBD 486F F08B 6CD5 B078 5087 752C 61E8 4E73 C713
To claim this, I am signing this object:
| (function() { | |
| var sessions = document.getElementsByClassName("session"); | |
| var hd = []; | |
| var sd = []; | |
| var pdf = []; | |
| for (var i = 0; i < sessions.length; i++) { | |
| var session = sessions[i]; | |
| var sessionid = session.getAttribute("id"); | |
| sessionid = sessionid.substring(0, sessionid.indexOf("-")); | |
| var title = session.getElementsByClassName("title")[0].innerText; |
I hereby claim:
To claim this, I am signing this object:
| # Disable SSL validation | |
| [System.Net.ServicePointManager]::ServerCertificateValidationCallback = {$true} | |
| # Get saltapi credentials | |
| $SaltApiCredential = Get-Credential | |
| $user = $SaltApiCredential.UserName | |
| $pass = $SaltApiCredential.GetNetworkCredential().Password | |
| # Log in to saltapi | |
| Invoke-RestMethod -Uri https://salt:7443/login -Method Post -Body @{username=$user;password=$pass;eauth='pam'} -SessionVariable session |
| //1.0: | |
| javascript:(function()%7Bvar%20v%3Ddocument.getElementsByTagName(%22video%22)%5B0%5D%3Bif%20(typeof%20v%20!%3D%3D%20'undefined'%20%26%26%20v.currentTime%20%3E%200)%20%7Bv.playbackRate%20%3D%201%3Bconsole.log(%22playbackRate%20%3D%20%22%20%2B%20v.playbackRate)%3B%7D%7D)() | |
| //+0.1: | |
| javascript:(function()%7Bvar%20v%3Ddocument.getElementsByTagName(%22video%22)%5B0%5D%3Bif%20(typeof%20v%20!%3D%3D%20'undefined'%20%26%26%20v.currentTime%20%3E%200)%20%7Bvar%20pb%20%3D%20v.playbackRate%20%2B%20.1%3Bpb%20%3D%20pb.toFixed(1)%3Bv.playbackRate%20%3D%20pb%3Bconsole.log(%22playbackRate%20%3D%20%22%20%2B%20v.playbackRate)%3B%7D%7D)() | |
| //-0.1: | |
| javascript:(function()%7Bvar%20v%3Ddocument.getElementsByTagName(%22video%22)%5B0%5D%3Bif%20(typeof%20v%20!%3D%3D%20'undefined'%20%26%26%20v.currentTime%20%3E%200)%20%7Bvar%20pb%20%3D%20v.playbackRate%20-%20.1%3Bpb%20%3D%20pb.toFixed(1)%3Bv.playbackRate%20%3D%20pb%3Bconsole.log(%22playbackRate%20%3D%20%22%20%2B%20v.playbackRate)%3B%7D%7D)() |
| vector < int > solve(int a0, int a1, int a2, int b0, int b1, int b2){ | |
| std::vector<int> score(2, 0); | |
| int clarity = a0 - b0; | |
| int originality = a1 - b1; | |
| int difficulty = a2 - b2; | |
| if (clarity > 0) { | |
| score[0]++; | |
| } | |
| else if (clarity < 0) { | |
| score[1]++; |
| function Get-NativeMethods | |
| { | |
| [CmdletBinding()] | |
| param( | |
| [switch]$Unsafe | |
| ) | |
| $Type = 'Microsoft.Win32.NativeMethods' | |
| if ($Unsafe) | |
| { | |
| $Type = 'Microsoft.Win32.UnsafeNativeMethods' |
| #!/bin/sh | |
| # install minikube | |
| brew cask install minikube | |
| # install and modify permission on hyperkit driver | |
| brew install hyperkit docker-machine-driver-hyperkit | |
| sudo chown root:wheel /usr/local/bin/docker-machine-driver-hyperkit | |
| sudo chmod u+s /usr/local/bin/docker-machine-driver-hyperkit |
| # create hello-node deployment | |
| kubectl create deployment hello-node --image=gcr.io/hello-minikube-zero-install/hello-node | |
| # create loadbalancer service to expose hello-node pods on external network | |
| kubectl expose deployment hello-node --type=LoadBalancer --port=8080 | |
| # open browser to service | |
| minikube service hello-node | |
| # scale number of pods behind service to 3 |
| # build xhyve | |
| git clone https://github.com/mist64/xhyve | |
| cd xhyve | |
| make | |
| # dump ubuntu iso to ./xhyve/ubuntu | |
| mkdir ubuntu | |
| cd ubuntu | |
| wget http://releases.ubuntu.com/14.04.2/ubuntu-14.04.2-server-amd64.iso | |
| dd if=/dev/zero bs=2k count=1 of=/tmp/tmp.iso |
| package main | |
| import ( | |
| "fmt" | |
| "io/ioutil" | |
| "log" | |
| "os" | |
| "os/exec" | |
| "path/filepath" | |
| "runtime" |