Skip to content

Instantly share code, notes, and snippets.

View debuggerboy's full-sized avatar
:octocat:
I may be slow to respond

debuggerboy debuggerboy

:octocat:
I may be slow to respond
View GitHub Profile
@debuggerboy
debuggerboy / README libvirt cloud-init with static networking.md
Created May 16, 2022 21:48 — forked from itzg/README libvirt cloud-init with static networking.md
Configuring a libvirt domain with a static IP address via cloud-init local datasource

Here is how to create a cloud-init disk image and OS disk image suitable for configuring into a libvirt domain file.

In my case I am naming my domain (a.k.a. virtual machine or VM) xenial with a static IP address of 192.168.0.101. The filenames "network-config" and "user-data" files are arbitrary, so they can be named with a prefix for the domain, etc.

First, get the cloud image and convert into QCOW2 format:

qemu-img convert -O qcow2 xenial-server-cloudimg-amd64-disk1.img xenial-server-cloudimg-amd64-disk1.qcow2
@debuggerboy
debuggerboy / digitalocean-promo-cupon-code-free-trial.md
Created September 19, 2019 22:49
DigitalOcean Coupon Code $35 / $100 1 Year Free Trial - April 2018

alt text

Digital Ocean Promo Coupon Code $35 / $100 1 Year Free Trial

1) Get $35 / $25 / $20 / $10 free DigitalOcean Credit.

2) Get DigitalOcean 1 Year Free Trial.

3) Get $100 Credit For 60 Days. $100 Free Credits

@debuggerboy
debuggerboy / aws_autoscaling_cron.rb
Created April 1, 2017 09:46 — forked from kixorz/aws_autoscaling_cron.rb
Running cron jobs in AWS Auto Scaling group is tricky. When you deploy the same code and configuration to all instances in the group, cron job would run on all of them. You may not want that. This script detects the first instance in the group and allows only this instance to run the job. IAM user used by this script needs to have permissions to…
#!/usr/bin/env ruby
require 'syslog'
require 'net/http'
require 'aws-sdk'
Syslog.open
AWS.config({
:access_key_id => '<iam user key>',
:secret_access_key => '<iam user secret>'
@debuggerboy
debuggerboy / app.py
Last active March 13, 2018 18:15 — forked from leplatrem/app.py
Simple Flask-couchdb demo
import simplejson
from flask import Flask, g, request
from couchdb.design import ViewDefinition
import flaskext.couchdb
app = Flask(__name__)
"""
CouchDB permanent view
@debuggerboy
debuggerboy / sangoma.sh
Created July 1, 2012 14:09 — forked from tony-landis/sangoma.sh
Automate installation of dahdi, libpri, sangoma, and all deps on debian
#!/bin/bash
DA='dahdi-linux-complete-2.5.0.1+2.5.0.1'
WAN="wanpipe-3.5.23"
PRI="libpri-1.4.12"
apt-get -y install build-essential
apt-get -y install gcc
apt-get -y install g++
apt-get -y install automake