-
Here is a list. I can do numbered lists.
-
I can do a list entry followed by two spaces.
This means this is in the same paragraph -
If I want a code block (with syntax highlighting, inside a list, something breaks:
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// | |
// Lame implementation of a channel | |
function channel() { | |
return new Channel(); | |
} | |
var id = 0; | |
function Channel(opts) { | |
this._queue = []; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
body | |
nav.navbar.navbar-default | |
div.container-fluid | |
div.navbar-header | |
a.navbar-brand(href='/') Wolves | |
ul.nav.navbar-nav(role="main-nav") | |
li | |
a(href='/howls') Howls | |
.container | |
main(role="page-container") |
The orthographic projection is available as d3.geo.orthographic. See also the interactive version, the rotating versions and the animated world tour.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/*** | |
* | |
* I want to execute someFunc() if the variable x is greater than 5 | |
* how would you rewrite the below to NOT use a conditional? (EG no "if" used) | |
* | |
* **/ | |
if(x > 5) { | |
someFunc(): | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$.getJSON('https://github.com/users/'+document.location.href.split('/')[3]+'/contributions_calendar_data', weekendWork); | |
function weekendWork(contribs) { | |
var inwe = false, streak = 0, highest = 0, total = 0, possible = 0; | |
contribs.forEach(function (c) { | |
var d = new Date(c[0]).getDay(); | |
if (d === 6) { | |
inwe = true; | |
} else if (d === 0 && inwe) { | |
possible++; | |
if (c[1] !== 0) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Utility methods | |
flatten_nested_array = (array) -> | |
[].concat array... | |
includes = (item, coll) -> | |
item = key_to_array(item) | |
for potential_match in coll | |
return true if item[0] == potential_match[0] && item[1] == potential_match[1] | |
false |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
"hello" === "hello #true | |
String("hello") === "hello" #true | |
new String("hello") === "hello" #false | |
new String("hello") == "hello" #true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Export your Wordpress posts to Tumblr (also allows to delete some.) | |
# Author: Alexandre Solleiro <[email protected]> | |
# How-to: | |
# 1. Export your Wordpress posts (http://en.blog.wordpress.com/2006/06/12/xml-import-export/) | |
# 2. Edit the information below to match your settings | |
# 3. To import, type "ruby wordpress2tumblr.rb --run" in the command line | |
# 4. To delete some posts, type "ruby wordpress2tumblr.rb --delete 1,2,3,4" where 1,2,3,4 are post numbers. (Be careful not to use spaces between IDs) | |
# Edit these | |
WP_EXPORT_PATH = "./wordpress.2009-09-14.xml" # path to the Wordpress Export file |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
g=Golf=Hash | |
def g.method_missing s, a | |
k=[] | |
case s.to_s[-1] | |
when ?1 | |
a.reduce :* | |
when ?2 | |
a.split.sort_by{|i| i[1] }*' ' | |
when ?3 | |
h1 1..a |
NewerOlder