- Install tools to build:
sudo apt-get update
sudo apt-get install kernel-package fakeroot wget bzip2
- Linux-2.6.39.1-linode34 is same as regular 2.6.39
#!/usr/bin/env python | |
# Reflects the requests from HTTP methods GET, POST, PUT, and DELETE | |
# Written by Nathan Hamiel (2010) | |
from BaseHTTPServer import HTTPServer, BaseHTTPRequestHandler | |
from optparse import OptionParser | |
class RequestHandler(BaseHTTPRequestHandler): | |
def do_GET(self): |
def humanize secs | |
[[60, :seconds], [60, :minutes], [24, :hours], [1000, :days]].map{ |count, name| | |
if secs > 0 | |
secs, n = secs.divmod(count) | |
"#{n.to_i} #{name}" | |
end | |
}.compact.reverse.join(' ') | |
end |
require 'socket' | |
class Graphite | |
def initialize(host) | |
@host = host | |
end | |
def socket | |
return @socket if @socket && !@socket.closed? | |
@socket = TCPSocket.new(@host, 2003) |
javascript:(function(e,a,g,h,f,c,b,d)%7Bif(!(f=e.jQuery)%7C%7Cg%3Ef.fn.jquery%7C%7Ch(f))%7Bc=a.createElement(%22script%22);c.type=%22text/javascript%22;c.src=%22http://ajax.googleapis.com/ajax/libs/jquery/%22+g+%22/jquery.min.js%22;c.onload=c.onreadystatechange=function()%7Bif(!b&&(!(d=this.readyState)%7C%7Cd==%22loaded%22%7C%7Cd==%22complete%22))%7Bh((f=e.jQuery).noConflict(1),b=1);f(c).remove()%7D%7D;a.documentElement.childNodes%5B0%5D.appendChild(c)%7D%7D)(window,document,%221.3.2%22,function($,L)%7B$('%23header,%20.pagehead,%20.breadcrumb,%20.commit,%20.meta,%20%23footer,%20%23footer-push').remove();%20$('%23files,%20.file').css(%7B%22background%22:%22none%22,%20%22border%22:%22none%22%7D);%20$('link').removeAttr('media');%7D); |
#!/usr/bin/env python | |
"""Simple HTTP Server With Upload. | |
This module builds on BaseHTTPServer by implementing the standard GET | |
and HEAD requests in a fairly straightforward manner. | |
""" |
This gist was writen in 2012 and it was solving specific problem in Rails & SimpleForm. Some fellow developers were pointing out this may be out dated concept. That's why I advise everyone to read comment section bellow to have a full grasp of alternative solutions
other sources that may be helpful to understand why this may not be best idea:
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
## Options to set on the command line | |
d-i debian-installer/language string en | |
d-i debian-installer/country string US | |
d-i debian-installer/locale string en_GB.UTF-8 | |
# Optionally specify additional locales to be generated. | |
d-i localechooser/supported-locales multiselect en_US.UTF-8, de_DE.UTF-8 | |
# Keyboard selection. | |
# keymap is an alias for keyboard-configuration/xkb-keymap | |
d-i keymap select de |
This word list is recommended by MNX.io in the article A Proper Server Naming Scheme.
Choose a word at will from the word list below.
The easiest way to randomly get a word from the wordlist on Linux is:
shuf -n 1 $FILENAME