Skip to content

Instantly share code, notes, and snippets.

View ytspar's full-sized avatar

Yury Tsukerman ytspar

View GitHub Profile
@joeguilmette
joeguilmette / gist:ef231d10554da29c6782
Last active October 1, 2015 05:41
Bangkok for Jean and Chris

#Bangkok Survival Guide This is by no means complete or anything, but hopefully it'll give you a quick rundown of how I learned to enjoy and indeed fall in love with Bangkok. It is by no means everyone's cup of tea, so I will take no offense if you hate it, hate my ideas of what to do, or whatever. So... Here we go!

PS I didn't proofread this at all.

##Stay Near Saphan Taksin It has a BTS station and a boat pier. The neighborhood sucks but you wont spend any time there. You'll get the fuck out and thanks to the public transit available there you'll be able to go anywhere in the city ASAP regardless of traffic.

##Transportation The key to the city is access to transportation next to your bed. Once you have access, you just need to understand the different ways to get around, how they are effected by traffic, and how to mitigate those effects. Kind of like any city in the world.

helpers do
def dev_pages(dir)
sitemap.resources.select do |resource|
resource.path.start_with?(dir) && resource.parent == nil && resource.data.archive != true && resource.data.published != false #&& resource.metadata[:options][:layout] == 'developments'
end.sort_by { |resource| resource.data.order || 9999 }
end
end
@timdorr
timdorr / .gitconfig
Created January 26, 2016 15:57
.gitconfig aliases
[alias]
st = status -sb
lg = log --color --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit --
up = !git fetch origin && git rebase origin/master
mup = !git fetch origin && git merge origin/master
done = "!git checkout master && git pull && git fetch -p && git branch --merged | grep -Pv '\\*|master' | xargs -n 1 git branch -d"
@BrianGilbert
BrianGilbert / pngout.rb
Last active March 11, 2016 17:35 — forked from paulredmond/pngout.rb
PNGOut Homebrew Formula
require 'formula'
class Pngout < Formula
url 'http://static.jonof.id.au/dl/kenutils/pngout-20130221-darwin.tar.gz'
homepage 'http://www.jonof.id.au/kenutils'
sha256 '995cc1df35e68b723c8143ad82c058be763f9af4fc373894ec74de3e7f18d0dd'
version '20130221'
def install
prefix.install Dir['*']
@renatocarvalho
renatocarvalho / mailto_helper.rb
Last active May 9, 2017 03:40
Middleman email obfuscate helper
# ====================================
# Obfuscate email
# Adapted from:
# http://stackoverflow.com/questions/483212/effective-method-to-hide-email-from-spam-bots2
# Usage:
# = mailto('hi@email.com', 'Get in touch', 'btn btn--nav')
# ====================================
MAIL_TO = 'mailto:'
AT = '@'
DOT = '.'
@minipai
minipai / gist:3150020
Created July 20, 2012 10:18
Middleman 3 Template Layouts
title
Layouts &amp; Partials

Layouts

Layouts allow the common HTML surrounding individual pages to be shared across all your templates. The most basic layout has some shared content and a yield call where templates will place their contents. Furthermore, With wrap_layout, content_for and partial you can build a complex layout inheritance, reduce the duplication of you code in templates to a minimal amount.

Basic layout

@prabhu
prabhu / gist:509d048561db92195600
Created February 5, 2015 11:32
Iptables rule for mosh
# Mosh uses udp range 60000 - 61000. Just allow 60000 alone for added security
-A INPUT -p udp -m multiport --dports 60000:61000 -j ACCEPT
@scalopus
scalopus / TrueWifi.user.js
Created August 9, 2012 08:37
True Wifi - Autologin script
// ==UserScript==
// @name Truewifi Auto Login/Logout 2
// @version 1.01
// @author Warun Kietduriyakul, script derived from Mr.Montree Phomkam
// @namespace http://www.jomyut.net
// @description True Wifi automatic login/re-login script when time is exceed.
// @include http*://portal.trueinternet.co.th/*
// ==/UserScript==
//################################################################
@genadyo
genadyo / gist:295a5e8f0d743f57137f
Created November 27, 2014 17:21
app_store_app_data.json
{
"491289025" : "ijinshan-kappmarket://",
"301521403" : "fb103361823069955://",
"492178411" : "ils492178411://",
"346142396" : "fb234434003713://",
"310633997" : "whatsapp://",
"370614765" : "com.condenet.newyorker://",
"325058491" : "rnmddisco://",
"382952264" : "epichttp://",
"477048487" : "predictwind://",
@mxlje
mxlje / ssl.md
Last active January 10, 2022 02:03
SSL Certificate Commands

These commands are needed every time you want to generate a new certificate signing request to give to an authority in order for them to generate and sign a certificate for you.

https://letsencrypt.org/ solves a lot of the pain involved with SSL certs, but sometimes you still need to go the "old school" route. I constantly forget how this stuff works, so I collected the most important commands (and what they do) here for easy copy & paste.

Generate new private key