Skip to content

Instantly share code, notes, and snippets.

View shanselman's full-sized avatar

Scott Hanselman shanselman

View GitHub Profile
@shanselman
shanselman / k8s-pi.md
Last active April 30, 2022 10:05 — forked from alexellis/k8s-pi.md
K8s on Raspbian

K8s on (vanilla) Raspbian Lite

Yes - you can create a Kubernetes cluster with Raspberry Pis with the default operating system Raspbian. Carry on using all the tools and packages you're used to with the officially-supported OS.

Pre-reqs:

  • You must use an RPi2 or 3 for Kubernetes
  • I'm assuming you're using wired ethernet (Wi-Fi also works)

Master node setup

app.get('/dumpme', function (req, res) {
var fs = require('fs'),
ws = fs.createWriteStream('debugdump/'+Date.now() + '.heapsnapshot'),
profiler = require('v8-profiler'),
snapshot = profiler.takeSnapshot(),
callback = ws.end.bind(ws);
snapshot.serialize(function(data) {
ws.write('' + data);
}, callback);//begin cpu profiling
REG ADD HKLM\SYSTEM\CurrentControlSet\Services\W3SVC /v SvcHostSplitDisable /t REG_DWORD /d 1 /f
REG ADD HKLM\SYSTEM\CurrentControlSet\Services\WAS /v SvcHostSplitDisable /t REG_DWORD /d 1 /f
<p>It's always the little throwaway tweets that go picked up. Not the ones that we agonize over. I was doing some work at the command line and typed "dotnet --version | clip" to copy the .NET Core version number into the clipboard. Then I tweeted a little "hey, remember this great utility?" and then the plane took off. I landed two hours later and it had over 500 RTs. Madness. </p> <p>It's funny that 10 year old command prompt utility (this was added in Vista) that everyone's forgotten elicits such an enthusiastic response.</p> <p>Since you all love that stuff, here's a few other "forgotten command prompt features."</p> <center> <blockquote class="twitter-tweet" data-lang="en"> <p lang="en" dir="ltr">Windows folk: Did you know you can pipe cmd prompt commands into the clipboard? <a href="https://t.co/fSE7ZHBBbB">pic.twitter.com/fSE7ZHBBbB</a></p>— Scott Hanselman (@shanselman) <a href="https://twitter.com/shanselman/status/744967489356865538">June 20, 2016</a></blockquote><script async src="//platform.twitte
<figure><a href="https://flic.kr/p/9arwvh"><img title="Burnout photo by Michael Himbeault used under cc" style="display: inline" alt="Burnout photo by Michael Himbeault used under cc" src="http://www.hanselman.com/blog/content/binary/Windows-Live-Writer/Burnout-Or-just-a-natural_CE1C/5357683026_a34d4df4ba_b_0d1090af-d456-4276-8f7d-19186a95d315.jpg" width="999" height="330"></a></figure> <p><a href="https://twitter.com/sarahmei">Sarah Mei</a> had a great series of tweets last week. She's a Founder of RailsBridge, Director of Ruby Central, and the Chief Consultant of <a href="https://www.devmynd.com/">DevMynd</a> so she's experienced with work both "on the job" and "on the side." Like me, she organizes OSS projects, conferences, but she also has a life, as do I.</p> <p>If you're reading this blog, it's likely that you have gone to a User Group or Conference, or in some way did some "on the side" tech activity. It could be that you have a blog, or you tweet, or you do videos, or you volunteer at a school.</p>
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Hosting;
using Microsoft.Extensions.Configuration;
namespace WebApplication
{
public class Program{
@shanselman
shanselman / keybase.md
Created February 9, 2015 06:30
keybase.md

Keybase proof

I hereby claim:

  • I am shanselman on github.
  • I am shanselman (https://keybase.io/shanselman) on keybase.
  • I have a public key whose fingerprint is E010 F4EC CF9A D085 FD3C A875 AE91 5B1E FA9A DBD0

To claim this, I am signing this object:

Set-ExplorerOptions -showHidenFilesFoldersDrives -showProtectedOSFiles -showFileExtensions
Enable-RemoteDesktop
cinst 1password
cinst 7zip
cinst 7zip.install
cinst AdobeAIR
cinst adobereader
cinst Atom
cinst markdownpad2
mkdir "~\Desktop\AzureFriday"
cd "~\Desktop\AzureFriday"
[Environment]::CurrentDirectory=(Get-Location -PSProvider FileSystem).ProviderPath
$a = ([xml](new-object net.webclient).downloadstring("http://channel9.msdn.com/Shows/Azure-Friday/feed/mp4high"))
$a.rss.channel.item | foreach{
$url = New-Object System.Uri($_.enclosure.url)
$file = $url.Segments[-1]
"Downloading: " + $file
if (!(test-path $file))
{
C:\Users\scottha>where chromedriver
c:\Python27\chromedriver.exe