Skip to content

Instantly share code, notes, and snippets.

Nick Glynn 17twenty

Block or report user

Report or block 17twenty

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
@17twenty
17twenty / 1_kubernetes_on_macOS.md
Created Jun 18, 2018 — forked from kevin-smets/1_kubernetes_on_macOS.md
Local Kubernetes setup on macOS with minikube on VirtualBox and local Docker registry
View 1_kubernetes_on_macOS.md

Requirements

Minikube requires that VT-x/AMD-v virtualization is enabled in BIOS. To check that this is enabled on OSX / macOS run:

sysctl -a | grep machdep.cpu.features | grep VMX

If there's output, you're good!

Prerequisites

@17twenty
17twenty / le-cert.rb
Created Mar 23, 2017 — forked from tobiasfeistmantl/le-cert.rb
Easy to use Ruby script to register and authorize new domains on Let's Encrypt and getting certificates for them. Call 'ruby le-new.rb' and follow the instructions. Install OpenSSL and the ACMEClient gem before!
View le-cert.rb
#!/usr/bin/env ruby
begin
require 'acme-client'
rescue LoadError
abort 'MISSING GEM! You haven\'t installed the ACME client. Install the gem with the command \'gem install acme-client\'.'
end
require 'openssl'
require 'resolv'
@17twenty
17twenty / drop_encrypt.go
Created Mar 13, 2017 — forked from josephspurrier/drop_encrypt.go
Golang - Drag and Drop AES Encryption and Decryption
View drop_encrypt.go
package main
import (
"crypto/aes"
"crypto/cipher"
"crypto/rand"
"fmt"
"io"
"io/ioutil"
"os"
@17twenty
17twenty / dontLeak.go
Created Nov 15, 2016 — forked from rakyll/gist:1aa860377dab8fd445431bbb3204f600
How to Not Leak Go Routines using Contexts
View dontLeak.go
package main
import (
"context"
"fmt"
)
func gen(ctx context.Context) <-chan int {
ch := make(chan int)
go func() {
@17twenty
17twenty / win32.go
Last active Jun 23, 2016 — forked from nathan-osman/win32.go
Simple Windows GUI application written in Go
View win32.go
package main
import (
"log"
"syscall"
"unsafe"
)
var (
kernel32 = syscall.NewLazyDLL("kernel32.dll")
@17twenty
17twenty / reader.go
Created Mar 10, 2016 — forked from jedy/reader.go
processes communicate with shared memory in golang
View reader.go
package main
// #include <stdlib.h>
// #include "wrapper.c"
import "C"
import "unsafe"
import "fmt"
func read(filename string) string {
f := C.CString(filename)
View -web-scraping-in-hybrid-mobile-app.html
<!DOCTYPE html>
<html>
<head>
<script src="//ajax.googleapis.com/ajax/libs/angularjs/1.3.4/angular.min.js"></script>
<script src="//ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
<script src="main.js"></script>
</head>
<body ng-app="myApp" ng-controller="myController">
<div>
<input type="text" ng-model="username" />
@17twenty
17twenty / _.md
Last active Aug 29, 2015 — forked from klange/_.md
View _.md

Since this is on Hacker News and reddit...

  • No, I don't distribute my résumé like this. A friend of mine made a joke about me being the kind of person who would do this, so I did (the link on that page was added later). My actual résumé is written in BSD mandoc.
  • I apologize for the use of _t in my types. I spend a lot of time at a level where I can do that; "reserved for system libraries? I am the system libraries".
  • Since people kept complaining, I've fixed the assignments of string literals to non-const char *s.
  • My use of type * name, however, is entirely intentional.
  • If you're using an older compiler, you might have trouble with the anonymous unions and the designated initializers - I think gcc 4.4 requires some extra braces to get them working together. Anything reasonably recent should work fine. Clang and gcc (newer than 4.4, at
View PRNGFixes.java
package com.scottyab.encryption;
/*
* This software is provided 'as-is', without any express or implied
* warranty. In no event will Google be held liable for any damages
* arising from the use of this software.
*
* Permission is granted to anyone to use this software for any purpose,
* including commercial applications, and to alter it and redistribute it
* freely, as long as the origin is not misrepresented.
You can’t perform that action at this time.