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
gpart create -s GPT ad4 | |
gpart add -b 34 -s 256 -t freebsd-boot ad4 | |
gpart add -b 290 -s 5242880 -t freebsd-swap ad4 | |
gpart add -b 5243170 -t freebsd-zfs ad4 | |
gpart bootcode -b /dist/boot/pmbr -p /dist/boot/gptzfsboot -i 1 ad4 |
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
zfs create -V 2G zroot/swap | |
zfs set org.freebsd:swap=on zroot/swap | |
zfs set checksum=off zroot/swap |
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
cd /usr/src | |
make buildworld buildkernel | |
make installkernel | |
mergemaster -p | |
make installworld | |
mergemaster -i -F -U | |
reboot |
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
browser.backspace_action = 0 | |
browser.cache.disk.capacity = 0 | |
browser.cache.disk.enable = 0 | |
browser.cache.offline.capacity = 0 | |
browser.download.manager.scanWhenDone = false | |
browser.formfill.enable = false | |
browser.fullscreen.animateUp = 0 | |
browser.fullscreen.autohide = false | |
browser.link.open_newwindow = 3 | |
browser.link.open_newwindow.restriction = 0 |
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
git format-patch master --stdout > fix_empty_poster.patch | |
git apply --stat fix_empty_poster.patch | |
git apply --check fix_empty_poster.patch | |
git am --signoff < fix_empty_poster.patch |
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 import -o cachefile=/tmp/zpool.cache zroot |
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
#!/bin/sh | |
# | |
# $FreeBSD$ | |
# | |
# PROVIDE: xcfbd | |
# REQUIRE: DAEMON | |
# BEFORE: LOGIN | |
# KEYWORD: shutdown |
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
class ActionView::Helpers::FormBuilder | |
alias :orig_label :label | |
# add a '*' after the field label if the field is required | |
def label(method, content_or_options = nil, options = nil, &block) | |
if content_or_options && content_or_options.class == Hash | |
options = content_or_options | |
else | |
content = content_or_options | |
end |
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
ActionView::Base.field_error_proc = Proc.new do |html_tag, instance| | |
unless html_tag =~ /^<label/ | |
unless html_tag =~ / type=(["'])(radio|chekbox)\1/ | |
%{<div class="field_with_errors">#{html_tag}<div class="error">#{instance.error_message.first}</div></div>}.html_safe | |
end | |
else | |
html_tag | |
end | |
end |
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
# app/controllers/users/password_controller.rb | |
class Users::PasswordsController < Devise::PasswordsController | |
def resource_params | |
params.require(:user).permit(:email, :password, :password_confirmation) | |
end | |
private :resource_params | |
end |
OlderNewer