Skip to content

Instantly share code, notes, and snippets.

James Le Cuirot chewi

Block or report user

Report or block chewi

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
@chewi
chewi / armhf-migrate.bash
Last active Nov 11, 2018
Migrates a Gentoo ARM system from the old style tuple (CHOST) to the new style tuple ending in hf.
View armhf-migrate.bash
#!/bin/bash
# Abort if things go wrong. Very important!
set -ex
# Fetch the old CHOST from make.conf or profile.
OLD_CHOST=$(portageq envvar CHOST)
# The new CHOST needs to end in hf. The vendor part doesn't really
# matter as long as it's not softfloat or softfp but the convention is
@chewi
chewi / make-the-tea
Last active Jan 9, 2019
Script to create Gentoo icedtea-bin tarballs
View make-the-tea
#!/bin/bash -e
OLD_PWD=${PWD}
source /lib/gentoo/functions.sh || true
if [ -z "$1" ]; then
echo "usage: $0 /usr/portage/packages/dev-java/icedtea-X.X.X.X.tbz2 [-rX]"
exit 1
fi
@chewi
chewi / Java_Quiz.txt
Created Dec 5, 2014
The Gentoo Java quiz
View Java_Quiz.txt
= Ant fun =
Q1. build.sysclasspath
Q1.1. What effect does the property build.sysclasspath=ignore have?
Q1.2. Why would we want to use it?
Q1.3. How would it 'break' packages?
@chewi
chewi / validation_sentences.rb
Created Oct 13, 2011
Make Rails use full sentences in validation messages.
View validation_sentences.rb
module I18n
module Backend
module Base
protected
def load_file_with_sentences(filename)
load_file_without_sentences(filename).tap do |data|
unless Rails.configuration.paths["config/locales"].expanded.include?(filename)
data.each do |locale, d|
if d and d.key?("errors")
You can’t perform that action at this time.