This is an as-short-as-sensible guide of the minimum necessary steps to setup Gentoo with LVM, LUKS, and UEFI booting using Gummiboot. It assumes you are already familiar with the subject of setting up GNU/Linux distributions and would like to know only what is specific to Gentoo for the abovementioned. This is most definitely not the only way, but it is the shortest I - as a current Gentoo newbie - was able to determine.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
%s/{% gist ryanburnette\/\([a-z|0-9]\{20}\) %}/<%= gist "ryanburnette", "\1" %>/g |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# You don't need Fog in Ruby or some other library to upload to S3 -- shell works perfectly fine | |
# This is how I upload my new Sol Trader builds (http://soltrader.net) | |
# Based on a modified script from here: http://tmont.com/blargh/2014/1/uploading-to-s3-in-bash | |
S3KEY="my aws key" | |
S3SECRET="my aws secret" # pass these in | |
function putS3 | |
{ | |
path=$1 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# -*- mode: ruby -*- | |
# vi: set ft=ruby : | |
# Vagrantfile API/syntax version. Don't touch unless you know what you're doing! | |
VAGRANTFILE_API_VERSION = "2" | |
Vagrant.configure(VAGRANTFILE_API_VERSION) do |config| | |
# Create a private network, which allows host-only access to the machine | |
# using a specific IP. | |
config.vm.define "kube-master" do |master| |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# This is probably some pseudo-makefile syntax, but basically I want to do this: | |
# - The `assets/scss/` dir has a bunch of "top level" Sass files to | |
# be compiled - foo.scss, bar.scss etc. | |
# - Note: these files will each generate one resulting .css file of the | |
# same name as the source inside the build dir. foo.scss -> foo.css etc. | |
# - The build needs to be re-run any time any partial inside of a | |
# subdir in the scss folder changes: if `assets/scss/baz/_baz.scss` changes, | |
# I want to recompile all of the "root" .scss files. | |
# I.e. all of the partials in subdirs are prerequisites. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function drips(){ | |
docker ps -q | xargs -n 1 docker inspect --format '{{ .NetworkSettings.IPAddress }} {{ .Name }}' | sed 's/ \// /' | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
from bottle import route, run, template, static_file, request, parse_auth, auth_basic | |
from redis import StrictRedis as Redis | |
from cork import Cork | |
from hashids import Hashids | |
from passlib.hash import pbkdf2_sha256 | |
incr1 = Hashids(salt="Eehu6laucelohh3b", min_length="16") | |
incr2 = Hashids(salt="Phiejapie2ahr9wa", min_length="8") |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from bottle import route, run, auth_basic | |
from passlib.hash import sha256_crypt | |
def check_pass(username, password): | |
hashed = ''.join(redis.hmget(username, "password")) | |
return sha256_crypt.verify(password, hashed) | |
@route('/', method='GET') | |
@auth_basic(check_pass) # <-- decorator | |
def index(): |
When connecting to a remote server via SSH it is often convenient to use SSH agent forwarding so that you don't need a separate keypair on that server for connecting to further servers.
This is enabled by adding the
ForwardAgent yes
option to any of your Host
entries in ~/.ssh/config
(or alternatively with the -A
option). Don't set this option in a wildcard Host *
section since any user on the remote server that can bypass file permissions can now als use keys loaded in your SSH agent. So only use this with hosts you trust.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* I add this to html files generated with pandoc. | |
*/ | |
html { | |
font-size: 100%; | |
overflow-y: scroll; | |
-webkit-text-size-adjust: 100%; | |
-ms-text-size-adjust: 100%; | |
} |