Skip to content

Instantly share code, notes, and snippets.

View terloger's full-sized avatar

Sergey Redkin terloger

View GitHub Profile
@terloger
terloger / iterm2-solarized.md
Created September 28, 2017 20:08 — forked from kevin-smets/iterm2-solarized.md
iTerm2 + Oh My Zsh + Solarized color scheme + Meslo powerline font + [Powerlevel9k] - (macOS)

Default

Default

Powerlevel9k

Powerlevel9k

@terloger
terloger / custom-error-page
Created April 25, 2017 11:38 — forked from simlegate/custom-error-page
Nginx return custom json
error_page 400 404 405 =200 @40*_json;
location @40*_json {
default_type application/json;
return 200 '{"code":"1", "message": "Not Found"}';
}
error_page 500 502 503 504 =200 @50*_json;
location @50*_json {
@terloger
terloger / 00.howto_install_phantomjs.md
Created February 2, 2017 07:40 — forked from julionc/00.howto_install_phantomjs.md
How to install PhantomJS on Debian/Ubuntu

How to install PhantomJS on Ubuntu

Version: 1.9.8

Platform: x86_64

First, install or update to the latest system software.

sudo apt-get update
sudo apt-get install build-essential chrpath libssl-dev libxft-dev
@terloger
terloger / meraki_strongswan_notes.md
Created January 20, 2017 13:48 — forked from psanford/meraki_strongswan_notes.md
connect to meraki client vpn from strongswan (ubuntu 16.04 edition)

These are my notes for connecting to a meraki client vpn from ubuntu 16.04. This configuration assumes you are using a psk for the ipsec auth.

Install the following packages:

apt-get install -y strongswan xl2tpd

Configure strong swan

@terloger
terloger / gist:a8564bea1c0703566658325c4be23e1a
Created August 1, 2016 08:25 — forked from stuart11n/gist:9628955
rename git branch locally and remotely
git branch -m old_branch new_branch # Rename branch locally
git push origin :old_branch # Delete the old branch
git push --set-upstream origin new_branch # Push the new branch, set local branch to track the new remote
@terloger
terloger / SassMeister-input-HTML.html
Created December 5, 2015 19:39
Generated by SassMeister.com.
<div class="foo">
Lorem ipsum dolor sit amet <br />
Lorem ipsum dolor sit amet
</div>
<div class="bar">
Lorem ipsum dolor sit amet <br />
Lorem ipsum dolor sit amet
</div>

Gearman can be installed on Windows through cygwin.

Install Cygwin packages

Install cygwin packages (through setup.exe):

  • gcc
  • make
  • libuuid1-devel
  • libiconv

Description

This simple script will take a picture of a whiteboard and use parts of the ImageMagick library with sane defaults to clean it up tremendously.

The script is here:

#!/bin/bash
convert $1 -morphology Convolve DoG:15,100,0 -negate -normalize -blur 0x1 -channel RBG -level 60%,91%,0.1 $2

Results

// Support routines for automatically reporting user timing for common analytics platforms
// Currently supports Google Analytics, Boomerang and SOASTA mPulse
// In the case of boomerang, you will need to map the event names you want reported
// to timer names (for mPulse these need to be custom0, custom1, etc) using a global variable:
// rumMapping = {'aft': 'custom0'};
(function() {
var wtt = function(n, t, b) {
t = Math.round(t);
if (t >= 0 && t < 3600000) {
// Google Analytics

Мы начинаем текстовую трансляцию Fronteers 2013, двухдневной конференции в Амстердаме — http://t.co/QB5SYQ3cMx

Пол Айриш из Google открывает шестую конференцию Fronteers. Россия на шестом месте по количеству участников, например.

На сцене Стив Саудерс с докладом «Pre-browsing» http://t.co/AuqI08mSjX

Сетевые проблемы замедляют веб. Медленные сотовые сети и даже перегруженный WiFi. Мы часто видим белый экран без индикации загрузки.

Заголовок: отдавайте браузеру нужное ещё до того, как он за этим обратится.