Skip to content

Instantly share code, notes, and snippets.

View codeprimate's full-sized avatar

Patrick Morgan codeprimate

  • Bellingham, WA
  • 19:39 (UTC -07:00)
View GitHub Profile
@sbellware
sbellware / perfection.md
Created July 22, 2014 15:19
The Purpose of Perfection - Much Ado About Agile 2014

The Purpose of Perfection


They say that "perfect is the enemy of the good". It's possible that their translation from French lacks some of the nuance of the original quote, and takes some license to rationalize a work management ideology where people who make decisions are insulated from suffering the consequences of those decisions. The typical diminishing returns of a software effort are not seen as a consequence of a poor understanding of perfection. There's a science to perfection, and western industry was taken by surprise by its competitive advantage

@keo
keo / bootstrap.sh
Last active January 25, 2024 15:49
Setup encrypted partition for Docker containers
#!/bin/sh
# Setup encrypted disk image
# For Ubuntu 14.04 LTS
CRYPTFS_ROOT=/cryptfs
apt-get update
apt-get -y upgrade
apt-get -y install cryptsetup
@rxaviers
rxaviers / gist:7360908
Last active April 18, 2025 20:59
Complete list of github markdown emoji markup

People

:bowtie: :bowtie: 😄 :smile: 😆 :laughing:
😊 :blush: 😃 :smiley: ☺️ :relaxed:
😏 :smirk: 😍 :heart_eyes: 😘 :kissing_heart:
😚 :kissing_closed_eyes: 😳 :flushed: 😌 :relieved:
😆 :satisfied: 😁 :grin: 😉 :wink:
😜 :stuck_out_tongue_winking_eye: 😝 :stuck_out_tongue_closed_eyes: 😀 :grinning:
😗 :kissing: 😙 :kissing_smiling_eyes: 😛 :stuck_out_tongue:
@schickling
schickling / Rakefile
Last active December 3, 2024 22:57
Activerecord without Rails
require "active_record"
namespace :db do
db_config = YAML::load(File.open('config/database.yml'))
db_config_admin = db_config.merge({'database' => 'postgres', 'schema_search_path' => 'public'})
desc "Create the database"
task :create do
ActiveRecord::Base.establish_connection(db_config_admin)
@shime
shime / _readme.md
Last active November 11, 2024 01:23 — forked from ryin/tmux_local_install.sh
installation script for tmux 1.9a

Having trouble installing the latest stable version of tmux?

I know, official package for your OS/distro is outdated and you just want the newest version of tmux.

Well, this script should save you some time with that.

Prerequisities

  • gcc
@stevehodgkiss
stevehodgkiss / native_columns_store.rb
Last active April 6, 2018 06:56
Allow specified session keys to be stored in a separate column using ActiveRecordStore. Useful for clearing sessions based on user_id.
class NativeColumnStore < ActiveRecord::SessionStore::Session
class << self
attr_reader :native_columns
def native_columns=(columns)
@native_columns = columns.map(&:to_s)
end
@native_columns = []
end
def data
@groveriffic
groveriffic / mathlink.rb
Created August 31, 2012 03:33
jruby-mathlink
@codeprimate
codeprimate / gist:3054582
Created July 5, 2012 16:11
OpenSSL Commands
The following assume that you are in the homedir of your private CA userdir (/home/myca). I would suggest creating a limited system account used solely for key creation and signing. Use homedir encryption to protect your CA keys from root compromise.
Create CA Certificate
openssl genrsa -des3 -out private/cacert.key 4096 -config conf/caconfig.cnf
openssl req -new -x509 -days 365 -key private/cacert.key -out certs/cacert.crt -config conf/caconfig.cnf
Create Server Certificate
openssl genrsa -des3 -out private/nullbacon.patrick-morgan.net.key 4096 -config conf/caconfig.cnf
openssl req -new -key private/nullbacon.patrick-morgan.net.key -out nullbacon.patrick-morgan.net.csr -config conf/caconfig.cnf
@nunosans
nunosans / html-head-boilerplate.html
Last active February 12, 2025 16:36
HTML Head Boilerplate & Reference
<!doctype html>
<html>
<head>
<!-- Priority tags. These must come first. -->
<meta charset="utf-8">
<meta http-equiv="x-ua-compatible" content="ie=edge; chrome=1"> <!-- Render Chrome if available or using latest version of Internet Explorer (Recommended). -->
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=no">
<!-- Document Title -->
<title>Page Title</title>
<!-- Allows control over where resources are loaded from. Place as early in the document as possible, only applies to content below this tag. -->
@cristianrasch
cristianrasch / gitlab.sh
Created April 22, 2012 01:50
Install Gitlab on Debian Squeeze/Wheezy
aptitude install -y git curl python-dev python-pip redis-server ruby1.9.1-full rubygems1.9.1
aptitude install -y mysql-server libmysqlclient-dev
adduser --system --shell /bin/sh --gecos 'git version control' --group --disabled-password --home /home/git git
adduser --disabled-login --gecos 'gitlab system' gitlab
usermod -a -G git gitlab
su - gitlab
ssh-keygen -q -N '' -t rsa -f /home/gitlab/.ssh/id_rsa
aptitude install gitolite
cp /home/gitlab/.ssh/id_rsa.pub /home/git/gitlab.pub
su - git