View gist:bc30f04984adfc5a21250e85d8ac2afd
This file contains 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
zpool create \ | |
-o cachefile=/etc/zfs/zpool.cache \ | |
-o ashift=12 -o autotrim=on -d \ | |
-o feature@async_destroy=enabled \ | |
-o feature@bookmarks=enabled \ | |
-o feature@embedded_data=enabled \ | |
-o feature@empty_bpobj=enabled \ | |
-o feature@enabled_txg=enabled \ | |
-o feature@extensible_dataset=enabled \ | |
-o feature@filesystem_limits=enabled \ |
View put_upload_middleware.py
This file contains 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 django.http import QueryDict | |
from django.http.multipartparser import MultiValueDict | |
from django.core.files.uploadhandler import ( | |
SkipFile, | |
StopFutureHandlers, | |
StopUpload, | |
) | |
class PutUploadMiddleware(object): |
View model_to_csv.rb
This file contains 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
model = MyModel | |
CSV.new(File.new(model.to_s.underscore + ".csv", "w")).tap do |csv| | |
column_names = model.column_names | |
csv << column_names | |
model.find_each do |ii| | |
csv << column_names.map do |cn| | |
ii.send(cn) | |
end | |
end |
View convert_db_to_utf8.rake
This file contains 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
# Why 'utf8_unicode_ci'? Read http://stackoverflow.com/questions/766809/whats-the-difference-between-utf8-general-ci-and-utf8-unicode-ci | |
THE_ONE_TRUE_COLLATION = 'utf8_unicode_ci' | |
task convert_db_to_utf8: :environment do | |
c = ActiveRecord::Base.connection | |
database_name = Rails.configuration.database_configuration[Rails.env]['database'] | |
puts "Setting default for new tables for #{database_name.inspect}..." | |
c.execute("ALTER DATABASE `#{database_name}` CHARACTER SET `utf8` COLLATE `#{THE_ONE_TRUE_COLLATION}`") |
View gist:ba1c966de61ce0d1aa23
This file contains 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
## Side Kick | |
You helped a fellow Treehouse member in our forum. You're a helpful person, like a superhero's side kick! | |
SideKick.png | |
Number of learners with this badge: 19 | |
## Accessibility | |
Accessibility is the practice of making websites available to all people, regardless of their abilities or disabilities. | |
Accessibility_Alt.png | |
Number of learners with this badge: 687 |
View keybase.md
Keybase proof
I hereby claim:
- I am myers on github.
- I am myers (https://keybase.io/myers) on keybase.
- I have a public key whose fingerprint is 632B 5A28 9024 993E CE78 8891 2380 E721 91FB 6F04
To claim this, I am signing this object:
View gist:9122856
This file contains 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
defmodule SessionHerderTest do | |
use ExUnit.Case | |
setup do | |
{:ok, sup_pid} = Chat.SessionSupervisor.start_link | |
{:ok, herder_pid} = Chat.SessionHerder.start_link | |
{:ok, pids: [sup_pid, herder_pid]} | |
end | |
teardown config do |
View reddit-ppa.pem
This file contains 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
-----BEGIN PGP PUBLIC KEY BLOCK----- | |
Version: SKS 1.1.4 | |
Comment: Hostname: keyserver.ubuntu.com | |
mI0ET0gy2QEEAMbpVvYeszQ6u6OMrXqyebsaDLQO3wsgI1vYgqVed/RcipzihDIXerYW74FV | |
np6xUG8ZyZyPqctXyYYel7QzHq5ea2liSrRU2UB406tDQaqFzs8MTx2xUu1rDN4W+UtS6K2y | |
OPIM3n1d9UEatuVFcyunHwG4ai0FXWXRD0CFfGT7ABEBAAG0GExhdW5jaHBhZCBQUEEgZm9y | |
IHJlZGRpdIi4BBMBAgAiBQJPSDLZAhsDBgsJCAcDAgYVCAIJCgsEFgIDAQIeAQIXgAAKCRB+ | |
B71BZVBtJ3CNA/9nJyEpv5OI7O8nis7jrLnZN84pPZvawmOn7uZNXr2m1ppqSx9+87exbRRu | |
cVqeL6FPYumPLsq5cn+FvCyWnhDS5aFVTKW1OHEssKapkCXmfDEV5bFUsjdzSkud0ytlnqZg |
View Vagrantfile
This file contains 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 : | |
require 'yaml' | |
# Vagrantfile API/syntax version. Don't touch unless you know what you're doing! | |
VAGRANTFILE_API_VERSION = '2' | |
Vagrant.require_plugin 'vagrant-berkshelf' | |
Vagrant.require_plugin 'vagrant-omnibus' |
NewerOlder