Skip to content

Instantly share code, notes, and snippets.

# The blog post that started it all: https://neocities.org/blog/the-fcc-is-now-rate-limited
#
# Current known FCC address ranges:
# https://news.ycombinator.com/item?id=7716915
#
# Confirm/locate FCC IP ranges with this: http://whois.arin.net/rest/net/NET-165-135-0-0-1/pft
#
# In your nginx.conf:
location / {
#!/usr/bin/env bash
# SEE YOU SPACE COWBOY by DANIEL REHN (danielrehn.com)
# Displays a timeless message in your terminal with cosmic color effects
# Usage: add "sh ~/seeyouspacecowboy.sh; sleep 2" to .bash_logout (or similar) in your home directory
# (adjust the sleep variable to display the message for more seconds)
# Cosmic color sequence
<script language="JavaScript" type="text/javascript">
// Comcast Cable Communications, LLC Proprietary. Copyright 2012.
// Intended use is to display browser notifications for critical and time sensitive alerts.
var SYS_URL='/e8f6b078-0f35-11de-85c5-efc5ef23aa1f/aupm/notify.do';
// var image_url='http://servicealerts.comcast.net:8080/images/mt';
var image_url='http://xfinity.comcast.net/constantguard/BotAssistance/notice/images';
var headertext1='<strong>Comcast Courtesy Notice</strong>';
var textline1='You have reached 90% of your <b>monthly data usage allowance</b>.';
var textline2='Please sign in for more information and to remove this alert.';
var acknowledgebutton='<a href=\"#\" onClick="document.location.href=\''+SYS_URL+'?dispatch=redirect&redirectName=login&paramName=bmUid\'" title="Sign in to acknowledge" style="color: #FFFFFF;"><img alt="Sign in to acknowledge" src="'+image_url+'/mt_signin.png"/></a>';
@naisanza
naisanza / gist:66eb80d274de7caa8924
Last active August 29, 2015 14:26 — forked from mattconnolly/gist:6097313
Adding a zfs dataset to a SmartOS zone. Seems there's no vmadm api for this, but you can do it with zonecfg:
# vmadm halt <uuid>
# zonecfg -z <uuid>
zonecfg:uuid> add dataset
zonecfg:uuid:dataset> set name=<zfs/path>
zonecfg:uuid:dataset> end
zonecfg:uuid> commit
zonecfg:uuid> exit
# zfs set mountpoint=legacy <zfs/path>
# vmadm boot <uuid>
@naisanza
naisanza / vbox_to_kvm.txt
Created November 6, 2015 21:56 — forked from bdha/vbox_to_kvm.txt
Migrating from VirtualBox to KVM on ZFS
# It's important to convert the vbox image (VMDK or VDI or whatever) using
# the same version of VirtualBox that created it. You can try converting the image
# with qemu-img or kvm-img, but weird version mismatches will possibly make it not
# work.
# On your VirtualBox machine:
cd $VBOX_ROOT/$MACHINE_ROOT/
VBoxManage clonehd machine.vmdk machine.img --format RAW
scp machine.img root@kvm-host:/somewhere
import socket
s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
host = "23.23.190.204"
port = 2002
s.connect((host, port))
print s.recv(1024)
s.send("hawaii\r\n")
print s.recv(1024)
@naisanza
naisanza / setup-lxc-shared-directory.sh
Created July 24, 2016 08:37 — forked from nottrobin/setup-lxc-shared-directory.sh
How to set up a *writeable* shared directory in an LXC/LXD container
[robin@xps ~ ]$ lxc launch ubuntu:16.04 my-xenial # Create & start a new container
[robin@xps ~ ]$ getfacl ./share/ # Check extended permissions on "share" directory
# file: share
# owner: robin
# group: robin
user::rwx
group::rwx
other::r-x
[robin@xps ~ ]$ sudo ls -ld /var/lib/lxd/containers/my-xenial # Find the user ID for my container (165536)
[sudo] password for robin:

Keybase proof

I hereby claim:

  • I am naisanza on github.
  • I am naisanza (https://keybase.io/naisanza) on keybase.
  • I have a public key whose fingerprint is AF3D 82E5 FC82 4C28 8C06 7C3D 9083 C177 B4AE 7C4C

To claim this, I am signing this object:

@naisanza
naisanza / pedantically_commented_playbook.yml
Created March 5, 2016 19:50 — forked from marktheunissen/pedantically_commented_playbook.yml
Insanely complete Ansible playbook, showing off all the options
---
# ^^^ YAML documents must begin with the document separator "---"
#
#### Example docblock, I like to put a descriptive comment at the top of my
#### playbooks.
#
# Overview: Playbook to bootstrap a new host for configuration management.
# Applies to: production
# Description:
# Ensures that a host is configured for management with Ansible.