- Use case: Blog posts and books, not documentation for software.
- As much code as possible should be included within the Markdown file.
- I’m currently using
§as a meta-character.- I’m open to alternatives. Other characters I considered:
¡ ¿ Δ ≡ - I wanted it to be a non-ASCII character, to minimize the risk of conflicts.
- I’m open to alternatives. Other characters I considered:
This file contains hidden or 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
| self: super: | |
| { | |
| # Install overlay: | |
| # $ mkdir -p ~/.config/nixpkgs/overlays | |
| # $ curl https://gist.githubusercontent.com/LnL7/570349866bb69467d0caf5cb175faa74/raw/3f3d53fe8e8713ee321ee894ecf76edbcb0b3711/lnl-overlay.nix -o ~/.config/nixpkgs/overlays/lnl.nix | |
| userPackages = super.userPackages or {} // { | |
| self.config.allowUnfree = true; | |
| # core |
This file contains hidden or 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
| # requires anybar https://github.com/tonsky/AnyBar (brew cask install anybar) | |
| # to get your player_id and your authorization_header, open the devtools and go to the network inspector | |
| # refresh the games list, and then inspect the /games request | |
| # set authorization_header to the value of the authorization header | |
| # you can find your steam id in the json response of that same request | |
| # | |
| # to automatically update, make a cronjob | |
| # run crontab -e and add this line | |
| # | |
| # * * * * ruby <path-to-this-script> |
This file contains hidden or 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
| import {mockTimeSource} from '@cycle/time'; | |
| import {mockDOMSource} from '@cycle/dom'; | |
| describe.only('steve example', () => { | |
| function Router (sources, change$, definitions) { | |
| let instances = {}; | |
| function map (attr) { | |
| return change$.map(path => { | |
| if (path in instances) { |
made with esnextbin
This file contains hidden or 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
| #!/usr/bin/env ruby | |
| term = ARGV.join('+') | |
| puts "\033browse https://google.co.nz/#q=#{term}\033" | |
This file contains hidden or 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
| Never put a new line at the top of a scope | |
| So that you can see the structure of the tree | |
| Always put new lines between things on the same level with different responsibilities | |
| But if you have some things that are alike | |
| Like | |
| This | |
| And that |
This file contains hidden or 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
| import fs from 'fs'; | |
| import assert from 'assert'; | |
| import xs from 'xstream'; | |
| function xray (url, classToScrape) { | |
| return function scrape (callback) { | |
| // goes and parses internetty stuff | |
| callback(stuff); | |
| } |
This file contains hidden or 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 Message | |
| def initialize(method_name, *args, &block) | |
| @method_name = method_name | |
| @args = args | |
| @block = block | |
| end | |
| def call(value) | |
| value.send(@method_name, *@args, &@block) |
This file contains hidden or 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
| live_loop :drums do | |
| sample :drum_tom_lo_hard | |
| sleep 0.4 | |
| end | |
| i = 0 | |
| live_loop :woo do | |
| sync :drums | |
| if i % 4 == 0 && i % 40 < 20 | |
| sample :bass_thick_c |