this:
FROM localhost:5000/ubuntu/base-12.04:latest
MAINTAINER The CTI Solutions Inc. Team
ADD delete_me_code/ /var/www/current/
RUN mkdir /var/www/current/log
RUN mkdir /var/www/current/tmp
RUN mkdir /var/www/current/var
this:
FROM localhost:5000/ubuntu/base-12.04:latest
MAINTAINER The CTI Solutions Inc. Team
ADD delete_me_code/ /var/www/current/
RUN mkdir /var/www/current/log
RUN mkdir /var/www/current/tmp
RUN mkdir /var/www/current/var
class DeKernel | |
def self.run | |
system "clear" | |
puts "It's generally recommended to leave at least three of your latest kernels" | |
all_kernels = Kernels.find_all_kernels | |
installed_kernels = Kernels.find_installed_kernels(all_kernels) | |
kernels_to_remove = Kernels.ask_which_to_remove(installed_kernels) | |
Kernels.purge_packages_from_kernels_list(kernels_to_remove) | |
Kernels.print_other_kernels_message | |
end |
a = { :a => nil }
running this code first causes the below to return in reverse order.
b = { :a => nil }
running this code first causes the below to return in correct order.
{ :y => true, :s => true }.collect { |k, v| k }
is the code that returns the array. It is run the same way every iteration.
For this bug to manifest, irb must be restarted between tests. Once an irb session has returned the array in a particular direction, it will continue to return it in that direction no matter what is done until you exit and restart irb. (Thus, this bash script to automate starting and using irb.) This bug does not happen in ruby 1.9.3, meaning no matter what you do, you will always get the array returned in the same direction. The results are repeatably reliable.
The test_ruby_bug.txt file is the output of this script.
# The version of Ruby to be installed | |
ruby_ver="1.9.3-p429" | |
# The base path to the Ruby | |
ruby_home="/usr/local" | |
# Enable truly non interactive apt-get installs | |
export DEBIAN_FRONTEND=noninteractive | |
apt-get update |
#!/usr/bin/env ruby | |
file_string = File.read('mail.redact.small') | |
line_array = Array.new | |
file_string.each_line { |line| line_array << line } | |
uid_array = Array.new | |
line_array.each do |line| |
#!/bin/bash | |
if test -f $HOME/.profile | |
then | |
PROFILE_FILE="$HOME/.profile" | |
elif test -f $HOME/.bash_profile | |
then | |
PROFILE_FILE="$HOME/.bash_profile" | |
else | |
echo "Creating a new .bash_profile file." |
#!/bin/bash | |
# remove trailing whitespace | |
find ./ -name '*.rb' -exec sed -i "s/\s\+$//g" {} + | |
# switch tabs for two spaces | |
find ./ -name '*.rb' -exec sed -i "s/\t/ /g" {} + | |
# auto indent with Vim | |
# open any file in Vim, then: | |
:args ~/code/myproject/**/*.rb | argdo execute "normal gg=G" | update |
#!/usr/bin/env ruby | |
# Usage: | |
# `./find_duplicates.rb 'directory to search*'` for a dry run, and | |
# `./find_duplicates.rb 'directory to search*' --delete` to actually delete the duplicates. | |
find_path = ARGV[0] | |
delete = false | |
delete = true if ARGV[1] == "--delete" | |
files = `find #{find_path} -type f`.split "\n" |
package main | |
import ( | |
"code.google.com/p/go.crypto/ssh" | |
//"net/http" | |
"io/ioutil" | |
"net" | |
) | |
func main() { |
Section "InputClass" | |
MatchIsTouchpad "on" | |
Identifier "Touchpads" | |
Driver "mtrack" | |
# TrackpadDisable - Disables trackpad touch input. A value of 0 will enable the trackpad. A value of 1 will disable tapping and gestures but not movement. A value of 2 will disable all input. A value of 3 will also disable physical buttons. Integer. Default is 0. | |
# Sensitivity - Adjusts the sensitivity (movement speed) of the touchpad. This is a real number greater than or equal to zero. Default is 1. A value of 0 will disable pointer movement. | |
Option "Sensitivity" "0.65" | |
# FingerHigh - Defines the pressure at which a finger is detected as a touch. This is a percentage represented as an integer. Default is 5. | |
Option "FingerHigh" "12" | |
# FingerLow - Defines the pressure at which a finger is detected as a release. This is a percentage represented as an integer. Default is 5. |