Having trouble installing the latest stable version of tmux?
I know, official package for your OS/distro is outdated and you just want the newest version of tmux.
Well, this script should save you some time with that.
- gcc
Having trouble installing the latest stable version of tmux?
I know, official package for your OS/distro is outdated and you just want the newest version of tmux.
Well, this script should save you some time with that.
import math | |
import Image | |
import Levenshtein | |
class BWImageCompare(object): | |
"""Compares two images (b/w).""" | |
_pixel = 255 |
/* | |
* I add this to html files generated with pandoc. | |
*/ | |
html { | |
font-size: 100%; | |
overflow-y: scroll; | |
-webkit-text-size-adjust: 100%; | |
-ms-text-size-adjust: 100%; | |
} |
// Use Gists to store code you would like to remember later on | |
console.log(window); // log the "window" object to the console |
cue_file = 'file.cue' | |
d = open(cue_file).read().splitlines() | |
general = {} | |
tracks = [] | |
current_file = None |
Unless you are using Safari on OSX, most browsers will have some kind of free plugin that you can use to export the browser's history. So that's probably the easiest way. The harder way, which seems to be what Safari wants is a bit more hacky but it will also work for other browsers. Turns out that most of them, including Safari, have their history saved in some kind of sqlite database file somewhere in your home directory.
The OSX Finder cheats a little bit and doesn't show us all the files that actually exist on our drive. It tries to protect us from ourselves by hiding some system and application-specific files. You can work around this by either using the terminal (my preferred method) or by using the Cmd+Shft+G in Finder.
Once you locate the file containing the browser's history, copy it to make a backup just in case we screw up.
$.ajax({ | |
type: 'POST', // Use POST with X-HTTP-Method-Override or a straight PUT if appropriate. | |
dataType: 'json', // Set datatype - affects Accept header | |
url: "http://example.com/people/1", // A valid URL | |
headers: {"X-HTTP-Method-Override": "PUT"}, // X-HTTP-Method-Override set to PUT. | |
data: '{"name": "Dave"}' // Some data e.g. Valid JSON as a string | |
}); | |
/* Some clients do not support PUT or it’s difficult to send in a PUT request. For these cases, you could POST the request with a request header of X-HTTP-Method-Override set to PUT. What this tells the server is that the intended request is a PUT. Obviously this relies on the API you are accessing making use of the X-HTTP-Method-Override Header.*/ |
// paulcode.com | |
// tidy-html5 config file (mine's named "tidy.conf") | |
// tidy documentation is here: http://tidy.sourceforge.net/#docs | |
// tidy-html5 documentation here: http://w3c.github.io/tidy-html5/quickref.html#drop-empty-elements | |
join-classes: no | |
logical-emphasis: no | |
drop-empty-elements: no | |
anchor-as-name: no | |
doctype: auto |
Typing vagrant
from the command line will display a list of all available commands.
Be sure that you are in the same directory as the Vagrantfile when running these commands!
vagrant init
-- Initialize Vagrant with a Vagrantfile and ./.vagrant directory, using no specified base image. Before you can do vagrant up, you'll need to specify a base image in the Vagrantfile.vagrant init <boxpath>
-- Initialize Vagrant with a specific box. To find a box, go to the public Vagrant box catalog. When you find one you like, just replace it's name with boxpath. For example, vagrant init ubuntu/trusty64
.vagrant up
-- starts vagrant environment (also provisions only on the FIRST vagrant up)