Skip to content

Instantly share code, notes, and snippets.

@tehpeh
tehpeh / ddclient-cloudflare-macosx.md
Last active August 6, 2023 14:16
Dynamic DNS for Mac OS X with CloudFlare and ddclient

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

So it's been a while since I set up a #FreeBSD desktop from scratch, and things have gotten easier? :rising-intonation: :confused-dog-face: Curious? Read on!

Maybe I overcomplicated things last time (you can see the script here https://bit.ly/freebsd-bootstrap), it seems some steps are now redundant. Anyway, here's the simplest way I know to get a capable desktop system set up.

I'm doing this on an M1 Mac with VMware Fusion Tech Preview and FreeBSD 13.1-RELEASE. After (or during) install create a user and add it to the groups video, wheel and operator with

% pw usermod $USER -G wheel,operator,video
@tehpeh
tehpeh / root-on-zfs-setup.sh
Last active November 30, 2022 00:55
Root on ZFS with GPT custom partitions and geli
#!/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
@tehpeh
tehpeh / db.rake
Created September 17, 2012 02:05
Enable hstore on rake db:schema:load
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 / docker-on-centos-8.txt
Created September 1, 2021 02:07
How to install and configure Docker on Centos 8 (VM instead of using Docker Desktop)
# Install docker
# from: https://docs.docker.com/engine/install/centos/
sudo yum install -y yum-utils
sudo yum-config-manager \
--add-repo \
https://download.docker.com/linux/centos/docker-ce.repo
sudo yum install docker-ce docker-ce-cli containerd.io
# check fingerprint 060A 61C5 1B55 8A7F 742B 77AA C52F EB6B 621E 9F35
# OR if error on install, sometimes specific version of containerd.io is needed
sudo dnf install https://download.docker.com/linux/centos/7/x86_64/stable/Packages/containerd.io-1.2.6-3.3.el7.x86_64.rpm

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 / google-analytics-outbound-link-tracking.html
Last active December 16, 2015 13:28
Outbound link tracking for Google Analytics using YUI3 (SquareSpace compatible)
@tehpeh
tehpeh / tddium.rake
Created June 27, 2012 06:33 — forked from tddium/tddium.rake
Installing hstore extension in Postgresql 9.1 database for Tddium
# 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
@tehpeh
tehpeh / centos-deploy.txt
Created May 8, 2012 06:43
CentOS Deploy
Setup:
------
See ror-deploy.txt for general instructions.
Create user:
------------
groupadd staff
useradd [user] -g staff
@tehpeh
tehpeh / ror-deploy.txt
Created May 8, 2012 06:41
RoR Deploy
General steps for a RoR deployment on linux.
For Ubuntu, see ubuntu-deploy.txt
For CentOS, see centos-deploy.txt
Information:
------------
- users
cat /etc/passwd