Skip to content

Instantly share code, notes, and snippets.

Tim Preston tehpeh

Block or report user

Report or block tehpeh

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@tehpeh
tehpeh / root-on-zfs-setup.sh
Last active Nov 8, 2018
Root on ZFS with GPT custom partitions and geli
View root-on-zfs-setup.sh
#!/bin/sh
# Tested on FreeBSD 11.2
# Start installation as usual, but choose 'Shell' in the partitioning menu.
# References:
# https://wiki.freebsd.org/RootOnZFS/GPTZFSBoot
# https://wiki.freebsd.org/RootOnZFS/GPTZFSBoot/9.0-RELEASE
# https://svnweb.freebsd.org/base/head/usr.sbin/bsdinstall/scripts/zfsboot?view=markup
View keybase.md

Keybase proof

I hereby claim:

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

To claim this, I am signing this object:

@tehpeh
tehpeh / ddclient-cloudflare-macosx.md
Last active Jul 8, 2019
Dynamic DNS for Mac OS X with CloudFlare and ddclient
View ddclient-cloudflare-macosx.md

Update June 2019

The patch described below may no longer be necessary. CloudFlare instructions here. Perl module JSON::Any may still be required, however, see comments.

Description

Dyn's free dynamic DNS service will be ending on Wednesday, May 7th, 2014.

CloudFlare, however, has a little known feature that will allow you to update your DNS records via API or a command line script called ddclient. This will

@tehpeh
tehpeh / google-analytics-outbound-link-tracking.html
Last active Dec 16, 2015
Outbound link tracking for Google Analytics using YUI3 (SquareSpace compatible)
View google-analytics-outbound-link-tracking.html
@tehpeh
tehpeh / db.rake
Created Sep 17, 2012
Enable hstore on rake db:schema:load
View db.rake
namespace :db do
namespace :enable do
desc "enable hstore extension"
task :hstore => [:environment, :load_config] do
ActiveRecord::Base.connection.execute('CREATE EXTENSION IF NOT EXISTS hstore;')
end
end
Rake::Task['db:schema:load'].enhance ['db:enable:hstore']
end
@tehpeh
tehpeh / tddium.rake
Created Jun 27, 2012 — forked from tddium/tddium.rake
Installing hstore extension in Postgresql 9.1 database for Tddium
View tddium.rake
# Copyright (c) 2011, 2012 Solano Labs All Rights Reserved
namespace :tddium do
desc "load database extensions"
task :db_hook do
Rake::Task["db:create"].invoke
Kernel.system("psql #{ENV['TDDIUM_DB_NAME']} -c 'CREATE EXTENSION hstore;'")
Rake::Task["tddium:default_db_hook"].invoke
View nginx-initd-centos
#!/bin/sh
#
# nginx - this script starts and stops the nginx daemon
#
# chkconfig: - 85 15
# description: Nginx is an HTTP(S) server, HTTP(S) reverse \
# proxy and IMAP/POP3 proxy server
# processname: nginx
# config: /etc/nginx/nginx.conf
# config: /etc/sysconfig/nginx
View nginx-initd-ubuntu
#! /bin/sh
### BEGIN INIT INFO
# Provides: nginx
# Required-Start: $remote_fs $syslog
# Required-Stop: $remote_fs $syslog
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: nginx init.d dash script for Ubuntu <=9.10.
# Description: nginx init.d dash script for Ubuntu <=9.10.
### END INIT INFO
View centos-deploy.txt
Setup:
------
See ror-deploy.txt for general instructions.
Create user:
------------
groupadd staff
useradd [user] -g staff
View ubuntu-deploy.txt
Setup:
------
See ror-deploy.txt for general instructions.
Packages:
---------
sudo aptitude update
sudo aptitude safe-upgrade
You can’t perform that action at this time.