Hi there!
The docker cheat sheet has moved to a Github project under https://github.com/wsargent/docker-cheat-sheet.
Please click on the link above to go to the cheat sheet.
# via http://tagaholic.me/2009/05/29/exploring-how-to-configure-irb.html#echo | |
def irb_verbosity_toggle | |
irb_context.echo ? irb_context.echo = false : irb_context.echo = true | |
end |
# Placed in Public Domain by Ralf Ebert, 2008 | |
# | |
# THIS SOFTWARE IS PROVIDED BY Ralf Ebert ''AS IS'' AND ANY | |
# EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED | |
# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE | |
# DISCLAIMED. IN NO EVENT SHALL Ralf Ebert BE LIABLE FOR ANY | |
# DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES | |
# (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; | |
# LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND | |
# ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
#!/bin/sh | |
baseurl=http://mygitlaburl | |
usermail=adminuser@mymailserver | |
userpass=adminpassword | |
repo_access=2 #0=denied 1=read 2=read&write | |
project_access=2 #0=deined 1=read 2=report 3=admin | |
# login | |
curl -s -I -c cookies.txt -d "utf8=✓&user[email]=$usermail&user[password]=$userpass&commit=Sign+in" $baseurl/users/sign_in |
Follow the instructions here: The Hitchhiker's Guide to Riding a | |
Mountain Lion http://j.mp/Qm5UJD, including installing XQuartz. | |
After installing XQuartz set the correct path to the X11 library to | |
install Ruby 1.8.7-p358 with rbenv: | |
export CPPFLAGS=-I/opt/X11/include | |
then let the compiler know where gcc-4.2 is: |
require 'net/ping' | |
@icmp = Net::Ping::ICMP.new('142.40.81.34') | |
rtary = [] | |
pingfails = 0 | |
repeat = 5 | |
puts 'starting to ping' | |
(1..repeat).each do | |
if @icmp.ping |
#!/bin/sh | |
BASEURL=http://git | |
USERNAME=DOMAIN_USER | |
USERPASS=DOMAIN_PASSWORD | |
RAW_FILE=RAW_FILE_URI | |
# login | |
curl -s -c cookies.txt -d "username=$USERNAME&password=$USERPASS" $BASEURL/users/auth/ldap/callback -o /dev/null | |
curl -s -c cookies.txt -b cookies.txt $BASEURL$RAW_FILE |
# = Usage | |
# Download to your jekyll site directory, and run it | |
# `ruby jekyll_image_fetcher.rb` | |
Dir['_posts/*.md'].each do |path| | |
content = File.open(path).read | |
basename = File.basename path, '.md' | |
content.gsub!(/!\[\]\((.+)\)/) do |m| | |
url = $1 |
Hi there!
The docker cheat sheet has moved to a Github project under https://github.com/wsargent/docker-cheat-sheet.
Please click on the link above to go to the cheat sheet.
# Run using "sudo accept_xcode_license.sh" | |
# | |
# Solving the OSX Yosemite Xcode Command Line Tools Licensing problem | |
# for multiple updates in order to script post-install tasks. | |
# Typical error reads after running "xcode-select --install" when setting up | |
# Homebrew is: "Agreeing to the Xcode/iOS license requires admin priviledges, | |
# please re-run as root via sudo" | |
# | |
# CREDIT: | |
# Based on a tip found at http://krypted.com/mac-os-x/licensing-the-xcode-command-line-tools/ |
[repositories] | |
local | |
oschina: http://maven.oschina.net/content/groups/public/ | |
oschina-ivy: http://maven.oschina.net/content/groups/public/, [organization]/[module]/(scala_[scalaVersion]/)(sbt_[sbtVersion]/)[revision]/[type]s/[artifact](-[classifier]).[ext] | |
typesafe: http://repo.typesafe.com/typesafe/ivy-releases/, [organization]/[module]/(scala_[scalaVersion]/)(sbt_[sbtVersion]/)[revision]/[type]s/[artifact](-[classifier]).[ext], bootOnly | |
#sonatype-oss-releases | |
#maven-central | |
#sonatype-oss-snapshots |