Skip to content

Instantly share code, notes, and snippets.

View yaakov-h's full-sized avatar
👦
Hi! I like shorts! They're comfy and easy to wear!

Yaakov yaakov-h

👦
Hi! I like shorts! They're comfy and easy to wear!
View GitHub Profile

Setting up netboot.xyz with an EdgeRouter

This document covers how to setup netboot.xyz, a service that provides iPXE-based installation and live boot of a bunch of operating systems, on a Ubiquiti EdgeRouter.

Assumptions

I've made a few assumptions throughout this document that will probably be different for your setup:

@sandcastle
sandcastle / redirect-ingress.yml
Created August 27, 2017 02:07
An example of a ingress redirect using kubernetes and nginx `configuration-snippet`
kind: Ingress
apiVersion: extensions/v1beta1
metadata:
name: redirect-ingress
annotations:
ingress.kubernetes.io/configuration-snippet: |
if ($host ~ ^(.+)\.somedomain\.io$) {
return 301 https://$1.domain.io$request_uri;
}
spec:
@alexeckermann
alexeckermann / iphone7.rb
Created September 12, 2016 11:07
iPhone 7 Pick Up Availability in Australia
# iPhone 6 Reservation Availability in Australia
# !! Please use responsibly. Personal use only !!
# `ruby iphone6.rb` - list all available models in all stores
# `ruby iphone6.rb R405` - list available models for a specific store, Rundle Place in this example.
require 'open-uri'
require 'json'
MODEL_NAMES = {
"MN8X2X/A" => "7 32 Black",
"MN8Y2X/A" => "7 32 Silver",
@mikeash
mikeash / test.m
Created July 9, 2012 21:15
Cocoa array slicing
// clang -framework Foundation -fobjc-arc -O3 test.m
#import <Foundation/Foundation.h>
@interface Slice : NSObject
@property NSInteger start;
@property NSInteger length;
@end
@implementation Slice