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
# run as root or add sudo | |
mount /dev/sdX /mnt | |
mount --rbind /dev /mnt/dev | |
mount --make-rslave /mnt/dev | |
mount -t proc /proc /mnt/proc | |
mount --rbind /sys /mnt/sys | |
mount --make-rslave /mnt/sys | |
mount --rbind /tmp /mnt/tmp | |
chroot /mnt /bin/bash | |
source /etc/profile |
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
for i in {0..255} ; do | |
printf "\x1b[38;5;${i}mcolour${i}\n" | |
done |
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
--- | |
driver: | |
name: docker | |
use_sudo: false | |
platforms: | |
- name: centos | |
driver_config: | |
image: centos:latest | |
provision_command: curl -L https://www.opscode.com/chef/install.sh | bash |
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 NullBook | |
def title | |
'No book exists' | |
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
bin/rails c --sandbox | |
User.destroy_all | |
exit |
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
ActiveRecord::Base.logger.level = :debug | |
ActiveRecord::Base.logger.level = :info | |
ActiveRecord::Base.logger.level = :warn | |
ActiveRecord::Base.logger.level = :error | |
ActiveRecord::Base.logger.level = :fatal | |
ActiveRecord::Base.logger.level = :unknown |
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
Rails.cache.read 'my_caching_key' |
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
wget https://download.elasticsearch.org/elasticsearch/elasticsearch/elasticsearch-1.5.2.deb | |
sudo dpkg -i elasticsearch-1.5.2.deb |
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
ActiveRecord::Base.transaction do | |
raise AcitveRecord::Rollback if something_bad_happens | |
end |
NewerOlder