- Get a GitHub account: https://github.com/
- Github > Dashboard > New Repository ... https://github.com/repositories/new
- Enter a Project Name and Description; click "Create Repository"
- On the project page ignore the suggested setup instructions... instead click on the "Admin" button
- Check the "GitHub Pages" checkbox... You'll get a popup.
- Click the "Automatic GitHub page Generator" button.
- Choose a funky colour... or go safe with just white... then click "Create Page" button
//create the menu itens | |
chrome.contextMenus.create({ | |
"title": "Cache: Last Hour", | |
"onclick": function () { | |
clear("Cache", 1000 * 60 * 60) | |
} | |
}); | |
chrome.contextMenus.create({ | |
"title": "Cache: Last Day", | |
"onclick": function () { |
HTMLTextAreaElement.prototype.getCaretPosition = function () { //return the caret position of the textarea | |
return this.selectionStart; | |
}; | |
HTMLTextAreaElement.prototype.setCaretPosition = function (position) { //change the caret position of the textarea | |
this.selectionStart = position; | |
this.selectionEnd = position; | |
this.focus(); | |
}; | |
HTMLTextAreaElement.prototype.hasSelection = function () { //if the textarea has selection then return true | |
if (this.selectionStart == this.selectionEnd) { |
javascript: (function(document) { | |
window.open('data:text/html;charset=utf-8,' + encodeURIComponent(' | |
<!doctype html> | |
<head> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
<link href="http://google-code-prettify.googlecode.com/svn/trunk/src/prettify.css" type="text/css" rel="stylesheet" /> | |
<style> | |
pre.prettyprint { padding: 0; border: none; } | |
</style> | |
<script src="http://google-code-prettify.googlecode.com/svn/trunk/src/prettify.js" type="text/javascript"></script> |
@main-font-size: 16px; | |
.x-rem (@property, @value) { | |
// This is a workaround, inspired by https://github.com/borodean/less-properties | |
@px-fallback: @value * @main-font-size; | |
-: ~`(function () { return ';@{property}: @{px-fallback}'; }())`; | |
-: ~`(function () { return ';@{property}: @{value}rem'; }())`; | |
} |
[default] | |
access_key = asf | |
bucket_location = US | |
cloudfront_host = cloudfront.amazonaws.com | |
cloudfront_resource = /2010-07-15/distribution | |
default_mime_type = binary/octet-stream | |
delete_removed = False | |
dry_run = False | |
encoding = UTF-8 | |
encrypt = False |
In this document I am using Sass's SCSS syntax. You can choose to use the indented syntax in sass, if you prefer it, it has no functional differences from the SCSS syntax.
For Less, I'm using the JavaScript version because this is what they suggest on the website. The ruby version may be different.
GitHub supports several lightweight markup languages for documentation; the most popular ones (generally, not just at GitHub) are Markdown and reStructuredText. Markdown is sometimes considered easier to use, and is often preferred when the purpose is simply to generate HTML. On the other hand, reStructuredText is more extensible and powerful, with native support (not just embedded HTML) for tables, as well as things like automatic generation of tables of contents.
import os | |
import urllib2 | |
import tarfile | |
import shutil | |
import traceback | |
# Downloads and installs the dateutil library into a directory called 'dateutil' | |
# alongside your saved Pythonista scripts. | |
# It also creates a directory called 'temp' during the installation process which | |
# is deleted after installation. |
require 'digest/md5' | |
def gfm(text) | |
# Extract pre blocks | |
extractions = {} | |
text.gsub!(%r{<pre>.*?</pre>}m) do |match| | |
md5 = Digest::MD5.hexdigest(match) | |
extractions[md5] = match | |
"{gfm-extraction-#{md5}}" | |
end |