#Jekyll Markdown Quick Reference
####Write in simply awesome markdown
layout: post
title: Markdown Style Guide
---| SLIDES := $(patsubst %.md,%.md.slides.pdf,$(wildcard *.md)) | |
| HANDOUTS := $(patsubst %.md,%.md.handout.pdf,$(wildcard *.md)) | |
| all : $(SLIDES) $(HANDOUTS) | |
| %.md.slides.pdf : %.md | |
| pandoc $^ -t beamer --slide-level 2 -o $@ | |
| %.md.handout.pdf : %.md | |
| pandoc $^ -t beamer --slide-level 2 -V handout -o $@ |
| /* | |
| This example shows how you can use your data structure as a basis for | |
| your Firebase security rules to implement role-based security. We store | |
| each user by their Twitter uid, and use the following simplistic approach | |
| for user roles: | |
| 0 - GUEST | |
| 10 - USER | |
| 20 - MODERATOR |
| ''' | |
| Non-parametric computation of entropy and mutual-information | |
| Adapted by G Varoquaux for code created by R Brette, itself | |
| from several papers (see in the code). | |
| This code is maintained at https://github.com/mutualinfo/mutual_info | |
| Please download the latest code there, to have improvements and | |
| bug fixes. |
| #!/bin/bash | |
| url=http://redefininggod.com | |
| webarchive=https://web.archive.org | |
| wget="wget -e robots=off -nv" | |
| tab="$(printf '\t')" | |
| additional_url=url.list | |
| # Construct listing.txt from url.list | |
| # The list of archived pages, including some wildcard url |
#Jekyll Markdown Quick Reference
####Write in simply awesome markdown
layout: post
title: Markdown Style Guide
---| #!/usr/bin/python | |
| import socket | |
| import struct | |
| import sys | |
| # We want unbuffered stdout so we can provide live feedback for | |
| # each TTL. You could also use the "-u" flag to Python. | |
| class flushfile(file): | |
| def __init__(self, f): |
| #!/usr/bin/env perl | |
| # wikilink2link.pl - Convert GitHub wikilinks to Markdown links. | |
| # | |
| # Preserves wikilink-like substrings in delimited code and fenced code | |
| # blocks. | |
| # | |
| # Now lives at: <https://gist.github.com/daf711474eb53318b722> | |
| # | |
| # USAGE |
| // | |
| // Implementation using express-jwt middle | |
| // | |
| var express = require('express'), | |
| ejwt = require('express-jwt'), | |
| jwt = require('jsonwebtoken'), | |
| passport = require('passport'), | |
| bodyParser = require('body-parser'), | |
| LocalStrategy = require('passport-local').Strategy, | |
| BearerStrategy = require('passport-http-bearer').Strategy; |
While this gist has been shared and followed for years, I regret not giving more background. It was originally a gist for the engineering org I was in, not a "general suggestion" for any React app.
Typically I avoid folders altogether. Heck, I even avoid new files. If I can build an app with one 2000 line file I will. New files and folders are a pain.
| #!/bin/sh | |
| # Configure homebrew permissions to allow multiple users on MAC OSX. | |
| # Any user from the admin group will be able to manage the homebrew and cask installation on the machine. | |
| # allow admins to manage homebrew's local install directory | |
| chgrp -R admin /usr/local | |
| chmod -R g+w /usr/local | |
| # allow admins to homebrew's local cache of formulae and source files | |
| chgrp -R admin /Library/Caches/Homebrew |