Skip to content

Instantly share code, notes, and snippets.

```sh
CACHE MANIFEST
#////////////////////////
# Max-Validity: 2 Weeks and 5 Hours
# Check-Update-Every: 60 Minutes
# Update-Style: Immediate
# On-Update: reload
# On-Download: showLoadbar
#///////////////////////
CACHE MANIFEST
#////////////////////////
# Max-Validity: 2 Weeks and 5 Hours
# Check-Update-Every: 60 Minutes
# Update-Style: Immediate
# On-Update: reload
# On-Download: showLoadbar
#///////////////////////
@alex-min
alex-min / lint_ruby.sh
Created January 14, 2016 15:08
catches some style problems cane and tailor might miss
#!/bin/bash
# done quickly, don't look here
# this catches some style problems cane and tailor might miss
echo "---- Doing checks -----"
echo "[+] additional space"
find "$PWD" | grep -F .rb | grep -v schema.rb | xargs pcregrep -n -M "\n\nend"
find "$PWD" | grep -E '\.e?rb$' | xargs grep -nE ' $'
echo "[+] missing space"
find "$PWD" | grep -E '\.e?rb$' | grep -v schema.rb | xargs grep -nE "[A-Za-Z]:['\"]"
@alex-min
alex-min / ssh_proxy.sh
Created February 18, 2016 15:52
proxy ssh
#!/bin/bash
YOUTUBEIGNORE="-x 9.192.115.0/24 -x 77.153.128.46 -x 199.223.232.0/24 -x 74.125.206.0/24 -x 64.233.167.0/24 -x 199.223.233.0/24 -x 199.223.234.0/24 -x 199.223.235.0/24 -x 199.223.236.0/24 -x 199.223.237.0/24 -x \
199.223.238.0/24 -x 199.223.239.0/24 -x 207.223.160.0/24 -x 207.223.161.0/24 -x 207.223.162.0/24 -x 207.223.163.0/24 -x 207.223.164.0/24 -x 207.223.165.0/24 -x 207.223.166.0/24 -x 207.223.167.0/24 -x 207.223.168\
.0/24 -x 207.223.169.0/24 -x 207.223.170.0/24 -x 207.223.171.0/24 -x 207.223.172.0/24 -x 207.223.173.0/24 -x 207.223.174.0/24 -x 207.223.175.0/24 -x 208.65.152.0/24 -x 208.65.153.0/24 -x 208.65.154.0/24 -x 208.6\
5.155.0/24 -x 208.117.224.0/24 -x 208.117.225.0/24 -x 208.117.226.0/24 -x 208.117.227.0/24 -x 208.117.228.0/24 -x 208.117.229.0/24 -x 208.117.230.0/24 -x 208.117.231.0/24 -
@alex-min
alex-min / keybase.md
Created February 22, 2016 11:05
keybase.md

Keybase proof

I hereby claim:

  • I am alex-min on github.
  • I am alexmin (https://keybase.io/alexmin) on keybase.
  • I have a public key whose fingerprint is 6EA1 980F 0A4A B9D7 B638 24D3 0142 4345 91F2 06FF

To claim this, I am signing this object:

require 'html_validation'
include PageValidations
HaveValidHTML.show_html_in_failures = true
HTMLValidation.ignored_attribute_errors = ['moznomarginboxes', 'mozdisallowselectionprint']
Capybara::Session.class_eval do
alias :no_html_validation_visit :visit
def visit(visit_url)
result = no_html_validation_visit(visit_url)
if driver.response_headers['Content-Type'].include?('text/html')
local M = {}
-----
math.randomseed( os.time() )
math.random()
-----
local function num2bs(num)
local _mod = math.fmod or math.mod
local _floor = math.floor
--
local result = ""

Keybase proof

I hereby claim:

  • I am alex-min on github.
  • I am alexmin (https://keybase.io/alexmin) on keybase.
  • I have a public key whose fingerprint is 2072 083A 46DF 68F9 0D45 0848 924D 281F FD45 AA4D

To claim this, I am signing this object:

require 'html_validation'
include PageValidations
HaveValidHTML.show_html_in_failures = true
HTMLValidation.ignored_attribute_errors = ['moznomarginboxes', 'mozdisallowselectionprint']
module HTMLValidationSession
def visit(url)
result = super(url)
if driver.response_headers['Content-Type'].include?('text/html')
ssl_certificate /etc/letsencrypt/live/example.com/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/example.com/privkey.pem;
ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
ssl_prefer_server_ciphers on;
ssl_ciphers "EECDH+AESGCM:EDH+AESGCM:ECDHE-RSA-AES128-GCM-SHA256:AES256+EECDH:DHE-RSA-AES128-GCM-SHA256:AES256+EDH:ECDHE-RSA-AES256-GCM-SHA384:DHE-RSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-SHA384:ECDHE-RSA-AES128-SHA256:ECDHE-RSA-AES256-SHA:ECDHE-RSA-AES128-SHA:DHE-RSA-AES256-SHA256:DHE-RSA-AES128-SHA256:DHE-RSA-AES256-SHA:DHE-RSA-AES128-SHA:ECDHE-RSA-DES-CBC3-SHA:EDH-RSA-DES-CBC3-SHA:AES256-GCM-SHA384:AES128-GCM-SHA256:AES256-SHA256:AES128-SHA256:AES256-SHA:AES128-SHA:DES-CBC3-SHA:HIGH:!aNULL:!eNULL:!EXPORT:!DES:!MD5:!PSK:!RC4";
ssl_session_cache shared:SSL:10m;
ssl_dhparam /etc/ssl/certs/dhparam.pem;
ssl_session_timeout 1d;
ssl_session_tickets off;