Skip to content

Instantly share code, notes, and snippets.

%YAML 1.2
---
# http://www.sublimetext.com/docs/3/syntax.html
name: AsciiDoc (Asciidoctor)
file_extensions:
- adoc
- ad
- asciidoc
scope: text.asciidoc
contexts:
%YAML 1.2
---
# http://www.sublimetext.com/docs/3/syntax.html
name: Nim
file_extensions:
- nim
- nims
scope: source.nim
contexts:
main:
@Keats
Keats / ast.rs
Created September 28, 2017 03:17
/// All Tera nodes that can be encountered
#[derive(Clone, Debug, PartialEq)]
pub enum Node {
/// A call to `{{ super() }}` in a block
Super,
/// Some actual text
Text(String),
/// A `{{ }}` block
VariableBlock(Expr),
declare module "router5" {
interface ErrorCodes {
ROUTER_NOT_STARTED: string;
NO_START_PATH_OR_STATE: string;
ROUTER_ALREADY_STARTED: string;
ROUTE_NOT_FOUND: string;
SAME_STATES: string;
CANNOT_DEACTIVATE: string;
CANNOT_ACTIVATE: string;
TRANSITION_ERR: string;
#[derive(Deserialize)]
pub struct SignupData {
#[validate(email)]
email: String,
// this would first run min_length and then call validate_unique_username
#[validate(min_length=2, custom=validate_unique_username)]
username: String,
#[validate(min_length=8, max_length=255)]
password: String,
///
declare module ReduxSimpleRouter {
import R = Redux;
import H = HistoryModule;
export const TRANSITION: string;
export const UPDATE_LOCATION: string;
interface HistoryMiddleware<S> extends R.Middleware<S> {
listenForReplays(store: R.Store<S>, selectRouterState?: Function): void;
@Keats
Keats / bubble.scss
Created December 25, 2013 00:09
Css Bubble
$red: #C91F2C;
.bubble {
position: relative;
width: 60px;
height: 60px;
text-align: center;
font: 25px/60px Arial, sans-serif;
color: white;