Skip to content

Instantly share code, notes, and snippets.

View hoffmanc's full-sized avatar

Chris Hoffman hoffmanc

View GitHub Profile
@hoffmanc
hoffmanc / en.yml
Last active December 20, 2015 15:09
Hand rolled ICS support
# locales/en.yml
en:
time:
formats:
ical: "%Y%m%dT%H%M%SZ"
# -*- encoding: utf-8 -*-
Gem::Specification.new do |s|
s.name = 'parallel_assets_compiler'
s.version = '0.2.0'
s.platform = Gem::Platform::RUBY
s.author = 'Jørgen Orehøj Erichsen'
s.email = 'joe@erichsen.net'
s.summary = 'Compile assets in parallel'
s.description = 'Compile assets in parallel to speed up deployment'
@hoffmanc
hoffmanc / exportData.py
Created July 12, 2011 13:23
Exporting Data from Access with Python
import pyodbc
import sys
import csv
conn = pyodbc.connect('Driver={Microsoft Access Driver (*.mdb, *.accdb)};DBQ=C:\the\path\to\the.accdb;')
cursor = conn.cursor()
def output_col(col):
if col:
if isinstance(col, unicode):
@hoffmanc
hoffmanc / setup.sh
Last active July 24, 2023 12:49
chatGPT scriptification of arch install guide
#!/bin/bash
set -e
# Display an introduction message
echo "Welcome to the Arch Linux installation script!"
echo "Please follow the instructions carefully."
# Determine the first wireless interface
wireless_interface=$(ip link | grep -E '^[0-9]+: w' | awk '{print substr($2, 1, length($2)-1)}')