Skip to content

Instantly share code, notes, and snippets.

Avatar

David Michael dmichael

View GitHub Profile
@esimov
esimov / factorial.go
Last active February 13, 2023 13:25
Factorial calculation in Go lang using three different methods: first traditionally, second with closure and third using memoization. The last method is the fastest between the three.
View factorial.go
package main
import (
"fmt"
"time"
)
const LIM = 41
var facts [LIM]uint64
@davisford
davisford / setup-avahi.sh
Created July 12, 2013 14:14
Setup avahi-daemon on Ubuntu for so you can reach hostname `ubuntu.local` from host OS
View setup-avahi.sh
sudo apt-get install avahi-daemon avahi-discover avahi-utils libnss-mdns mdns-scan
@tuzz
tuzz / github.css
Last active January 29, 2023 19:58
Github Markdown Stylesheet
View github.css
/*
Copyright (c) 2017 Chris Patuzzo
https://twitter.com/chrispatuzzo
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
@wizardishungry
wizardishungry / Gemfile
Last active February 12, 2018 18:49
Vagrant snippet to set VirtualBox guest CPU count to the number of host cores on Linux or OS X (broken 2018)
View Gemfile
gem 'concurrent'
@jrochkind
jrochkind / gist:2161449
Created March 22, 2012 18:40
A Capistrano Rails Guide
View gist:2161449

A Capistrano Rails Guide

by Jonathan Rochkind, http://bibwild.wordpress.com

why cap?

Capistrano automates pushing out a new version of your application to a deployment location.

I've been writing and deploying Rails apps for a while, but I avoided using Capistrano until recently. I've got a pretty simple one-host deployment, and even though everyone said Capistrano was great, every time I tried to get started I just got snowed under not being able to figure out exactly what I wanted to do, and figured I wasn't having that much trouble doing it "manually".