Skip to content

Instantly share code, notes, and snippets.

View shanemcd's full-sized avatar

Shane McDonald shanemcd

  • (Ansible (Red Hat (IBM)))
  • Jersey City
View GitHub Profile
@shanemcd
shanemcd / scratch_server.go
Created July 15, 2023 20:10 — forked from jschaf/scratch_server.go
A Go web server from scratch using syscalls
package main
// Simple, single-threaded server using system calls instead of the net library.
//
// Omitted features from the go net package:
//
// - TLS
// - Most error checking
// - Only supports bodies that close, no persistent or chunked connections
// - Redirects
@shanemcd
shanemcd / etc.fstab
Last active December 4, 2016 18:40 — forked from vadviktor/etc.fstab
Ubuntu guest VMware shared folders using open-vm-tools package and vmhgfs-fuse
.host: /mnt fuse.vmhgfs-fuse allow_other,uid=1000,gid=1000,auto_unmount,defaults 0 0
require 'rubygems'
require 'doc_raptor'
TEN_SECONDS = 10
FIVE_MINUTES = 300
DocRaptor.api_key "YOUR_API_KEY_HERE"
pdf_html = '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html lang="en"><body><a href="http://google.com">google</a></body></html>'
@shanemcd
shanemcd / itunes.sql
Created August 27, 2011 18:50 — forked from rkumar/itunes.sql
itunes music library database
/* create tables to store itunes music library data for quick access
- rkumar 2010 July
*/
drop table tracks;
create table tracks (
album_artist VARCHAR(50),
album_rating_computed INTEGER,
album_rating VARCHAR(50),
album VARCHAR(50),
all_items VARCHAR(50),
@shanemcd
shanemcd / xml2db.rb
Created August 27, 2011 18:30 — forked from rkumar/xml2db.rb
convert itunes music library to database sqlite3 using ruby
#!/usr/bin/env ruby
=begin
* Name: xml.rb
* Description parses xml iTunes Music Library and inserts into database
so other apps can use, rather than each time parsing xml file
* Author: Original - Aaron Patterson (xml parsing portion)
http://groups.google.com/group/nokogiri-talk/browse_thread/thread/97973521c6f5f0dc
* Additions by rkumar
* Date: 2010-08-04
* License: