https://mattbrictson.com/nginx-reverse-proxy-cache
https://www.nginx.com/resources/wiki/start/topics/examples/full/
require "pp" | |
block_size = 4_096 | |
def tags_from_file(filename) | |
no_tag_or_tag = /([^<>]+)|(<\/[^<>]+>)|(<[^<>]+?\/>)|(<\!\[CDATA\[(?:.*?)\]\]>)|(<[^!a-zA-Z][^<>]+>)|(<[^<>]+>)/ | |
reg_exp = /\A(?<p>(?:#{no_tag_or_tag}))*\g<p>*/ | |
block_size = 4_096 | |
Enumerator.new do |enum| |
#!/bin/bash | |
cd ~/projects/ | |
echo -en '\033]2;'$1'\007' # set the title of the window | |
case "$1" in | |
wubytes) cd wubytes && foreman start;; | |
kiwitime) cd kiwitime && rails s -p 5000;; |
#!/usr/bin/env ruby | |
# require 'bundler/setup' | |
# Bundler.require(:default) | |
module F | |
ZERO = -> p { -> x { x } } | |
ONE = -> p { -> x { p[x] } } | |
TWO = -> p { -> x { p[p[x]] } } |
(function() { | |
var buttons = { | |
next: $('button.next') | |
}; | |
buttons.next.addEventListener('click', function() { | |
lifeView.next(); | |
}); |
{ title: "My ER Diagram" } | |
# Tables | |
[User] { color: :blue } | |
*id | |
blog_id* <nullable> | |
name | |
[Blog] { color: :orange } | |
*id |
$tail -100f /var/log/applications/application.log | awk ' | |
/INFO/ {print "\033[32m" $0 "\033[39m"} | |
/Exception/ {print "\033[31m" $0 "\033[39m"} | |
' |
require 'benchmark/ips' | |
require 'faraday' | |
require 'excon' | |
require 'typhoeus'#, '~> 0.3.3' | |
require 'patron' | |
require 'net-http-persistent' | |
default_adapter = Faraday.new(:url => 'http://localhost') do |faraday| | |
faraday.adapter Faraday.default_adapter # make requests with Net::HTTP | |
end |
// https://gist.github.com/mateuspv/45bfb3e10a84e34b0074 | |
/** | |
Sweet.js version: 0.7.2 | |
`this` nickname `@` | |
Expected: | |
@ -> this | |
@something -> this.something | |
example: | |
function hello (tag) { |
[ | |
{ "keys": ["ctrl+alt+super+d"], "command": "toggle_side_bar" }, | |
{ "keys": ["super+l"], "command": "show_overlay", "args": {"overlay": "goto", "text": ":"} }, | |
{ "keys": ["super+shift+l"], "command": "expand_selection", "args": {"to": "line"} }, | |
{ "keys": ["ctrl+super+r"], "command": "reveal_in_side_bar" }, | |
{ "keys": ["alt+shift+up"], "command": "select_lines", "args": {"forward": false} }, | |
{ "keys": ["alt+shift+down"], "command": "select_lines", "args": {"forward": true} }, | |
{ "keys": ["ctrl+shift+<"], "command": "erb" }, | |
{ "keys": ["super+shift+t"], "command": "reopen_last_file" }, | |
{ "keys": ["super+i"], "command": "copy_path" }, |