Skip to content

Instantly share code, notes, and snippets.

@choyer
choyer / keybase.md
Created April 2, 2024 22:51
keybase.md

Keybase proof

I hereby claim:

  • I am choyer on github.
  • I am choyer (https://keybase.io/choyer) on keybase.
  • I have a public key ASAzyUyH7kH_EnGoaRvIXVpRLixPS1GeG6SiTjitO7usaQo

To claim this, I am signing this object:

@choyer
choyer / round.awk
Last active November 3, 2021 02:16
AWK/GAWK function to round float numbers to specified decimal place
function round(x, p, s) {
# DESC: Rounds float to the number of decimals specified
# ARGS: x (required) - number to round. float valid
# p - decimal place value rounded to
# defaults 1 if unspecified.
# RETURN: rounded float
# USAGE: round(5.255,2)
# NOTES: Handles positive/negative floats & returns ints
p = 10^p
s = 1
@choyer
choyer / resume.json
Last active May 13, 2021 03:36
Carl Hoyer's May 2021 Resume in JSON
{
"meta": { "theme": "elegant" },
"basics": {
"name": "Carl Hoyer",
"label": "Technologist",
"picture": "https://media-exp1.licdn.com/dms/image/C5635AQFoLNOq8AzBsA/profile-framedphoto-shrink_400_400/0/1616445989561?e=1620964800&v=beta&t=KBmtNkLKxSY7C8UFMA_XFNX8_nbmRuf0VzJZlR4MHmQ",
"email": "carl@hoyer.ca",
"phone": "416.580.0657",
"website": "",
"summary": "Technologist. A wide range of hands-on experience from bare-metal server and network setup, deployment & management to web development & user focused design solutions. Hands on problem solving.\n\nParticularly adept in the creation and management of web and mobile applications with specialties in:\nContainerization, orchestration, full stack web design & development, cloud architecture, source code management, continuous integration & automated deployment.",
@choyer
choyer / homebrew+cask-install.sh
Created November 30, 2014 23:16
Install Homebrew (without needing input) + Cask + All your packages
#!/bin/sh
#
# Homebrew
#
# This installs some of the common dependencies needed (or at least desired)
# using Homebrew.
# Check for Homebrew
if test ! $(which brew)
then
@choyer
choyer / schedule.rb
Created June 30, 2014 20:43
Backup 4.x Whenever Schedule File for Gitlab Backup (should be in ./config/)
BACKUP_MODULE_PATH = File.absolute_path("/root/Backup")
CONFIG_FILE_PATH = File.absolute_path("config.rb").to_s
env :PATH, ENV['PATH']
set :environment, 'production'
env :S3_ACCESS_KEY_ID, "YOUR_S3_ACCESS_KEY_ID"
env :S3_SECRET_ACCESS_KEY, "YOUR_S3_SECRET_ACCESS_KEY"
env :PUSHOVER_USER_KEY, "YOUR_PUSHOVER_USER_KEY"
@choyer
choyer / monthly_gitlab_backup.rb
Last active August 29, 2015 14:03
Backup 4.x Monthly Gitlab Backup Model
Model.new(:monthly_gitlab_backup, 'Monthly Backup for Gitlab') do
archive :gitlab_backup do |archive|
# archive.use_sudo
file_name = Dir.glob('/home/git/gitlab/tmp/backups/*').max_by{|f| File.ctime(f)}
archive.add file_name
end
store_with S3 do |s3|
s3.access_key_id = ENV['S3_ACCESS_KEY_ID']
@choyer
choyer / weekly_gitlab_backup.rb
Created June 30, 2014 20:38
Backup 4.x Weekly Gitlab Backup Model
Model.new(:weekly_gitlab_backup, 'Weekly Backup for Gitlab') do
archive :gitlab_backup do |archive|
# archive.use_sudo
file_name = Dir.glob('/home/git/gitlab/tmp/backups/*').max_by{|f| File.ctime(f)}
archive.add file_name
end
store_with S3 do |s3|
s3.access_key_id = ENV['S3_ACCESS_KEY_ID']
@choyer
choyer / daily_gitlab_backup.rb
Created June 30, 2014 20:37
Backup 4.x Daily Gitlab Backup Model
Model.new(:daily_gitlab_backup, 'Daily Backup for Gitlab') do
archive :gitlab_backup do |archive|
# archive.use_sudo
file_name = Dir.glob('/home/git/gitlab/tmp/backups/*').max_by{|f| File.ctime(f)}
archive.add file_name
end
store_with S3 do |s3|
@choyer
choyer / config.rb
Created June 30, 2014 20:21
Backup 4.x Config File (Gitlab Backup)
# encoding: utf-8
##
# Backup v4.x Configuration
#
# Documentation: http://meskyanichi.github.io/backup
# Issue Tracker: https://github.com/meskyanichi/backup/issues
##
# Config Options
@choyer
choyer / apache-configure
Created February 21, 2013 20:40
DIYMacServer - Apache httpd compile configure command
./configure -enable-layout=DIYMacServer \
-enable-mods-shared=all \
-with-ssl=/usr \
-with-mpm=prefork \
-disable-unique-id \
-enable-ssl \
-enable-dav \
-enable-cache \
-enable-proxy \
-enable-logio \