Skip to content

Instantly share code, notes, and snippets.

View LIttleAncientForestKami's full-sized avatar

Tomasz Borek LIttleAncientForestKami

View GitHub Profile
single_input::= NEWLINE | simple_stmt | compound_stmt NEWLINE
file_input::= (NEWLINE | stmt)* ENDMARKER
eval_input::= testlist NEWLINE* ENDMARKER
decorator::= '@' dotted_name ( '(' (arglist)? ')' )? NEWLINE
decorators::= decorator+
decorated::= decorators (classdef | funcdef | async_funcdef)
async_funcdef::= ASYNC funcdef
funcdef::= 'def' NAME parameters ('->' test)? ':' (TYPE_COMMENT)? func_body_suite
@imjasonh
imjasonh / markdown.css
Last active May 17, 2024 07:30
Render Markdown as unrendered Markdown (see http://jsbin.com/huwosomawo)
* {
font-size: 12pt;
font-family: monospace;
font-weight: normal;
font-style: normal;
text-decoration: none;
color: black;
cursor: default;
}
@thomasdarimont
thomasdarimont / HelloWorld.java
Last active October 11, 2022 18:44
HelloWorld in Java without using a "." character
import static java.lang.String.valueOf;
import static java.util.Arrays.fill;
/**
* Author: Thomas Darimont
*/
public interface HelloWorld {
static void main(String[] args) {
@mchelen
mchelen / gist:60b2853bf84117088662
Last active May 15, 2017 02:00
man zsh ubuntu 14.04
#!/bin/bash
# for ubuntu 14.04 with zsh 5.0.2
# bug: https://bugs.launchpad.net/ubuntu/+source/zsh/+bug/1242108
# file src: http://sourceforge.net/projects/zsh/files/zsh/5.0.2/zsh-5.0.2.tar.gz/download
wget -qO- "http://downloads.sourceforge.net/project/zsh/zsh/5.0.2/zsh-5.0.2.tar.gz?r=http%3A%2F%2Fsourceforge.net%2Fprojects%2Fzsh%2Ffiles%2Fzsh%2F5.0.2%2F&ts=1407408881&use_mirror=superb-dca3" | sudo tar xvz -C /usr/share/man/man1/ --wildcards "zsh-5.0.2/Doc/*.1" --strip-components=2 && sudo chown root:root /usr/share/man/man1/zsh*.1
@CrookedNumber
CrookedNumber / gist:8856939
Last active September 12, 2022 17:33
How to create Trello Cards from the Command Line (with a ~10 minute set-up)
  1. This is quick and dirty and not terribly maintainable. But it's very useful for creating quick cards from the terminal. Requires familiarity with Trello and a basic understanding of bash.
  2. Log-in to Trello.
  3. Go to: https://trello.com/1/appKey/generate
  4. Make note of your key. Replace any mention of YourTrelloKey with this hash.
  5. Create a token. Go to https://trello.com/1/authorize?key=YourTrelloKey&name=SimpleBASHScript&expiration=never&response_type=token&scope=read,write in your browser and follow directions.
  6. Make note of the token. Replace any mention of YourTrelloToken with this looong hash.
  7. Pick a reasonable number of the most popular boards you use. Grab the URLs of those boards. At the same time, think of short, one-word, easy-to-remember names for each board (e.g., work, homeprojects, wedding).
  8. Grab the board IDs of the boards you chose. It'll be the ~8 character hash-like string in the URL. E.g., for https://trello.com/b/aWsGTrsD/work the ID is aWsGTrsD
  9. One by one, plug thos