First create a Ubuntu 13.04 x64 droplet on DigitalOcean Control Panel
Then ssh with root account, run this in termianl:
$ wget -qO- https://raw.github.com/progrium/dokku/master/bootstrap.sh | sudo bash
# 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)
source 'https://rubygems.org' | |
gem "method_source", "~> 0.8.1" |
It’s probably a pretty bad idea to have your site go down, when people are supposed to read the blog post explaining the hack.
Notice how another site reporting the hack received more attention than Twitter’s own announcement. Why was that?