A very basic regex-based Markdown parser. Supports the
following elements (and can be extended via Slimdown::add_rule()
):
- Headers
- Links
- Bold
- Emphasis
- Deletions
<?php | |
namespace App\Http\Middleware; | |
use Closure; | |
use Illuminate\Http\Request; | |
use Illuminate\Http\Response; | |
use Symfony\Component\DomCrawler\Crawler; | |
class PjaxMiddleware |
<snippet> | |
<content><![CDATA[ | |
public function ${1:relationship}() | |
{ | |
return \$this->belongsToMany(${1/^(.+)$/(?1\u$1:)/g}::class, {$2:table}); | |
} | |
]]></content> | |
<!-- Optional: Set a tabTrigger to define how to trigger the snippet --> | |
<tabTrigger>belt</tabTrigger> | |
<!-- Optional: Set a scope to limit where the snippet will trigger --> |
# Your init script | |
# | |
# Atom will evaluate this file each time a new window is opened. It is run | |
# after packages are loaded/activated and after the previous editor state | |
# has been restored. | |
# | |
# An example hack to log to the console when each text editor is saved. | |
# | |
# atom.workspace.observeTextEditors (editor) -> | |
# editor.onDidSave -> |
{ | |
"parser": "babel-eslint", | |
"parserOptions": { | |
"ecmaVersion": 6, | |
"sourceType": "module" | |
}, | |
"env": { | |
"es6": true, | |
"amd": true, | |
"jquery": true, |
// Bouncing a user back to their last place after authentication with Express 3 | |
// To accompany http://stackoverflow.com/a/12443844/1380669 | |
// by therealplato | |
var express = require('express'); | |
var app = express(); | |
require('http').createServer(app).listen(3000 | |
, function(err){ | |
console.log(err || "Listening on 3000"); | |
}); |
[ | |
// Remove HTML tags | |
'/<(.*?)>/' => "$1", | |
// Remove setext-style headers | |
'/^[=\-]{2,}\s*$/m' => '', | |
// Remove footnotes? | |
'/\[\^.+?\](\: .*?$)?/m' => '', | |
'/\s{0,2}\[.*?\]: .*?$/' => '', | |
// Remove images | |
// '/!\[([^\[]+)\]\(([^\)]+)\)/' => '$1', |
import Vue from 'vue' | |
import _assign from 'lodash/assign' | |
import _isEqual from 'lodash/isEqual' | |
const videojs = window.videojs = require('video.js') | |
const defaults = { | |
poster: '', | |
fluid: true, | |
sources: [], | |
muted: false, |
from __future__ import absolute_import, division, print_function, \ | |
unicode_literals | |
import os | |
import math | |
import pprint | |
import datetime | |
import numpy as np | |
from timeit import default_timer | |
from collections import defaultdict |
<!DOCTYPE HTML><html><head><title>Viblo Machine Learning API documentation</title><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta http-equiv="Content-Type" content="text/html; charset=utf-8"><meta name="generator" content="https://github.com/raml2html/raml2html 6.4.1"><link rel="stylesheet" href="https://netdna.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css"><link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/9.3.0/styles/default.min.css"><script type="text/javascript" src="https://code.jquery.com/jquery-1.11.0.min.js"></script><script type="text/javascript" src="https://netdna.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js"></script><script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/9.3.0/highlight.min.js"></script><script type="text/javascript"> | |
$(document).ready(function() { | |
$('.page-header pre code, .top-resource-description pre code, .modal-body pre code').each(function(i, block) { | |
hljs.high |