Skip to content

Instantly share code, notes, and snippets.

View binki's full-sized avatar

Nathan Phillip Brink binki

View GitHub Profile
@binki
binki / Program.cs
Created November 27, 2017 15:03
csharp out parameters and exceptions
using System;
class Program
{
static void Main(string[] args)
{
var x = 5;
try
{
MethodThrowBeforeWrite(out x);
@binki
binki / tracklist-pixelterror-pals-3.md
Created November 11, 2017 15:17
Pixel Terror & Pals Vol 3 Tracklist
  1. Intro
  2. Pixel Terror — ID
  3. Pixel Terror — ID [with Pixel Terror — Final Boss]
  4. Pegboard Nerds — Move That Body (Soltan Remix)
  5. Focus Fire — ID [with Getter & Adair — Blood]
  6. Two Owls — ID [with Baauer — Higher (Sharps Edit)]
  7. Tynan & Breathe Carolina ft. Crichy Crich — ID [with Lil Uzi Vert — XO Tour Llif3 (Jauz Remix)]
  8. Effin — ID
  9. Pixel Terror — ID
  10. RIOT — ID [with Barely Alive — Ca$h]
@binki
binki / gist:476e19d95d23799a624f6b7d377ca9b9
Last active November 6, 2017 18:37
Thanks for routing through L3, Comcast
ohnobinki@gibby ~ $ ssh [email protected]
Last login: Mon Nov 6 18:01:01 UTC 2017 from c-68-43-58-177.hsd1.mi.comcast.net on ssh
root@hurin ~ # ping 77.95.34.187
PING 77.95.34.187 (77.95.34.187) 56(84) bytes of data.
64 bytes from 77.95.34.187: icmp_seq=1 ttl=55 time=77.7 ms
64 bytes from 77.95.34.187: icmp_seq=2 ttl=55 time=91.3 ms
64 bytes from 77.95.34.187: icmp_seq=3 ttl=55 time=77.7 ms
^C
--- 77.95.34.187 ping statistics ---
3 packets transmitted, 3 received, 0% packet loss, time 2003ms
@binki
binki / gist:c6017e6342f29e9ad2647258f34a9c9c
Last active November 6, 2017 18:16
traceroute culminet.com
ohnobinki@gibby ~ $ traceroute culminet.com
traceroute to culminet.com (31.22.1.133), 30 hops max, 60 byte packets
1 PEBKAC (192.168.1.1) 2.265 ms 2.275 ms 2.270 ms
2 96.120.40.77 (96.120.40.77) 19.510 ms 19.471 ms 19.487 ms
3 xe-0-1-0-sur03.grandrapids.mi.michigan.comcast.net (68.86.120.105) 19.493 ms 19.604 ms 20.338 ms
4 te-8-1-ur01.richland.mi.michigan.comcast.net (68.85.223.154) 20.325 ms xe-10-3-2-0-sur04.grandrapids.mi.michigan.comcast.net (68.87.190.86) 19.452 ms xe-11-1-0-0-sur01.taylor.mi.michigan.comcast.net (68.85.222.118) 20.314 ms
5 * * be-31-ar02.pontiac.mi.michigan.comcast.net (68.87.188.137) 26.629 ms
6 ae2.bar1.Detroit1.Level3.net (4.68.71.33) 26.825 ms 23.204 ms 23.003 ms
7 ae-3-3.bear1.Manchesteruk2.Level3.net (4.69.167.34) 111.765 ms 112.116 ms 112.109 ms
8 WILDCARD-UK.bear1.Manchesteruk2.Level3.net (195.50.121.134) 113.370 ms 113.319 ms 113.325 ms
using System;
class Program
{
static void Main()
{
var b = new Base();
b.DoSomething();
// The answer is 42!
interface IParent
{
void DoParentThings();
}
interface IChild : IParent
{
void DoChildThings();
}
class Child : object, IChild
{
@binki
binki / output.txt
Created October 23, 2017 15:48
mongo error when passing connection URL to connect()
sam ~ # mongo --nodb ~/.mongo-do-auth.js ~/s2.js
MongoDB shell version: 2.6.12
loading file: /root/.mongo-do-auth.js
2017-10-23T15:47:53.636+0000 Error: Invalid port number "asdf123@localhost" in connection string "mongodb://root:asdf123@localhost/admin" at src/mongo/shell/mongo.js:135
failed to load: /root/.mongo-do-auth.js

Consider this block-level code:

var test = true;

Consider the test variable. It does not worry about clothes or food. Yet it holds such beautiful truth.

gcc -Wall -o cForLoop cForLoop.c
@binki
binki / Program.cs
Created October 13, 2017 17:08
disposing IEnumerator not allowed
using System.Collections;
class Program
{
static void Main(string[] args)
{
IEnumerable enumerable = new[]
{
"a",
"b",