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
.markdown-preview:not([data-use-github-style]) { padding: 2em; font-size: 1.2em; color: rgb(171, 178, 191); background-color: rgb(40, 44, 52); overflow: auto; } | |
.markdown-preview:not([data-use-github-style]) > :first-child { margin-top: 0px; } | |
.markdown-preview:not([data-use-github-style]) h1, .markdown-preview:not([data-use-github-style]) h2, .markdown-preview:not([data-use-github-style]) h3, .markdown-preview:not([data-use-github-style]) h4, .markdown-preview:not([data-use-github-style]) h5, .markdown-preview:not([data-use-github-style]) h6 { line-height: 1.2; margin-top: 1.5em; margin-bottom: 0.5em; color: rgb(255, 255, 255); } | |
.markdown-preview:not([data-use-github-style]) h1 { font-size: 2.4em; font-weight: 300; } | |
.markdown-preview:not([data-use-github-style]) h2 { font-size: 1.8em; font-weight: 400; } | |
.markdown-preview:not([data-use-github-style]) h3 { font-size: 1.5em; font-weight: 500; } | |
.markdown-preview:not([data-use-github-style]) h4 { font-size: 1.2em; font-weight: 600; } | |
.markdown-preview:not([da |
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
module Foo | |
def baz | |
"I am from foo!" | |
end | |
end | |
module Bar | |
def baz | |
"I am from bar!" | |
end |
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
<html> | |
<head> | |
<title>This is my audio player</title> | |
</head> | |
<body> | |
<audio controls> | |
<source src="QmaJoCHjPT7RbzpG17D5HbYh3cuytmV8fnG437Gp8QY7wC" type="audio/mp4"> | |
</audio> |
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
sed -E 's:href=\"help[^\.]*\/([^\.]+)\.html\":href=\"#x\1\":g' print-export-source.html > print-export-source-proc.html | |
wkhtmltopdf --page-size "Letter" --dpi 765 --footer-spacing 4 --print-media-type --footer-center "[page] of [topage]" --footer-font-name "Helvetica Neue" --footer-font-size 11 --footer-line --footer-spacing 5 --header-spacing 5 --header-line --header-center "Tinderbox v7 Manual" --header-font-name "Helvetica Neue" --enable-toc-back-links toc --toc-header-text "Tinderbox v7 Manual - Table of Contents" --toc-text-size-shrink 1 --toc-level-indentation 4em "print-export-source-proc.html" "Tinderbox v7 Manual v7–2-0.pdf" | |
# N.B. extra --dpi 765 arg only needed for v0.12.4 |
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
# why a macro... | |
defmacrop d(sign, coef, exp) do | |
quote do | |
%Decimal{sign: unquote(sign), coef: unquote(coef), exp: unquote(exp)} | |
end | |
end | |
# instead of a function? | |
def d(sign, coef, exp) do | |
%Decimal{sign: sign, coef: coef, exp: exp} |
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
def foo(f) | |
case f | |
when /funky/ | |
puts "so funky" | |
when /chicken/ | |
puts "so chicken" | |
else | |
puts "bugawk" | |
end | |
end |
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
require 'net/http' | |
class PageFetcher | |
def fetch(url) | |
@response = Net::HTTP.get_response URI(url) | |
Response.new @response | |
end | |
class Response | |
def initialize(response) |
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
# Collaboration test... | |
describe Client do | |
it 'calls a_method on a server' do | |
client = Client.new | |
server = double 'server' | |
expect(server).to receive(:a_method).with(1, 2).and_return 3 | |
client.do_it(server) | |
end | |
end |
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
display dialog "Name your note..." default answer "" | |
set theName to text returned of result | |
tell application id "DNtp" | |
set theID to "F76B0AC1-6B7B-45A2-ADE6-8514F54671F4" | |
set theGroup to get record with uuid theID | |
set theRecord to create record with {name:theName, type:markdown, content:"# " & theName} in theGroup | |
set theFile to path of theRecord as POSIX file | |
tell application "Finder" to open theFile | |
end tell |
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
class FunkyTown | |
def time_to | |
end | |
def get_funky | |
end | |
protected | |
def get_down | |
end |