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.
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.
# if you want to monkey patch every controller, put this in initializers/active_admin.rb | |
ActiveAdmin::ResourceController.class_eval do | |
include ActiveAdmin::CSVStream | |
end |
# vim: ft=sh | |
from ubuntu:precise | |
# change to fast mirror | |
# run echo "deb http://archive.ubuntu.com/ubuntu precise main universe" > /etc/apt/sources.list | |
run echo "deb http://ftp.neowiz.com/ubuntu precise main universe" > /etc/apt/sources.list | |
# reduce output from debconf | |
env DEBIAN_FRONTEND noninteractive |
Ctrl + A Go to the beginning of the line you are currently typing on | |
Ctrl + E Go to the end of the line you are currently typing on | |
Ctrl + L Clears the Screen, similar to the clear command | |
Ctrl + U Clears the line before the cursor position. If you are at the end of the line, clears the entire line. | |
Ctrl + H Same as backspace | |
Ctrl + R Let’s you search through previously used commands | |
Ctrl + C Kill whatever you are running | |
Ctrl + D Exit the current shell | |
Ctrl + Z Puts whatever you are running into a suspended background process. fg restores it. | |
Ctrl + W Delete the word before the cursor |
Each of these commands will run an ad hoc http static server in your current (or specified) directory, available at http://localhost:8000. Use this power wisely.
$ python -m SimpleHTTPServer 8000
The diode bridge is the simplest rectifier I know.
Rectifier lets you share a directory with a docker container (just like $yourvm
shared folders).
You don't have to install anything in your containers, and you only need to install diod
in the host. diod
is packaged on Ubuntu/Debian distros, and will automatically be apt-get install
-ed if needed.
Since it uses diod
to make a bridge, I called it rectifier. Yeah, that sucks, so if you have a better name, I'll steal it!
class RBLineProfiler | |
WALL_TIME_LIMIT = 10e3 # ms | |
def initialize(app) | |
@app = app | |
end | |
def call(env) | |
result = nil | |
profile = lineprof(/./) { result = @app.call(env) } |
#!/bin/sh | |
# http://www.webupd8.org/2012/01/install-oracle-java-jdk-7-in-ubuntu-via.html | |
sudo add-apt-repository ppa:webupd8team/java | |
sudo apt-get update | |
sudo apt-get install oracle-java7-installer |
View the original gist: https://gist.github.com/428105
visit "/projects"
visit post_comments_path(post)