Skip to content

Instantly share code, notes, and snippets.

Avatar
🏠
Working from home

Evsyukov Denis juev

🏠
Working from home
View GitHub Profile
View gist:9484542
http {
map $http_user_agent $limit_bots {
default '';
~*(google|bing|yandex|msnbot) $binary_remote_addr;
}
limit_req_zone $limit_bots zone=bots:10m rate=1r/m;
server {
View gist:7311aebe148636846fc4

Setting up Vim as your Go IDE

The final IDE

Intro

I've been wanting to do a serious project in Go. One thing holding me back has been a my working environment. As a huge PyCharm user, I was hoping the Go IDE plugin for IntelliJ IDEA would fit my needs. However, it never felt quite right. After a previous experiment a few years ago using Vim, I knew how powerful it could be if I put in the time to make it so. Luckily there are plugins for almost anything you need to do with Go or what you would expect form and IDE. While this is no where near comprehensive, it will get you writing code, building and testing with the power you would expect from Vim.

Getting Started

I'm assuming you're coming with a clean slate. For me this was OSX so I used MacVim. There is nothing in my config files that assumes this is the case.

View gist:b2ab88ac6ce74487774a
server {
server_name yourghostdomain.com www.yourghostdomain.com;
access_log /home/nginx/domains/yourghostdomain.com/log/access.log combined buffer=32k;
error_log /home/nginx/domains/yourghostdomain.com/log/error.log;
root /home/nginx/domains/yourghostdomain.com/public;
location /blog {
include /home/nginx/domains/yourghostdomain.com/proxy.conf;
include /home/nginx/domains/yourghostdomain.com/proxycache.conf; }
@juev
juev / links.md
Last active Aug 29, 2015 — forked from r3nya/links.md
View links.md
View Sublime Text 2 HTML5 Boilerplate Snippet
<snippet>
<content><![CDATA[<!DOCTYPE html>
<!--[if lt IE 7]> <html class="no-js lt-ie9 lt-ie8 lt-ie7"> <![endif]-->
<!--[if IE 7]> <html class="no-js lt-ie9 lt-ie8"> <![endif]-->
<!--[if IE 8]> <html class="no-js lt-ie9"> <![endif]-->
<!--[if gt IE 8]><!--> <html class="no-js"> <!--<![endif]-->
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<title>${1:Project Name}</title>
View nginx-gitweb.md

This guide offers the least time-consuming way of setting up Nginx for serving Git repositories over HTTP using Gitweb. The stuff here has been tested with Git 1.9.1 and Nginx 1.6.0 on Debian Wheezy. Probably also works for Ubuntu, etc.

Total time ~ 10 minutes.

Install

Enable wheezy-backports by adding this line to /etc/apt/sources.list:

deb http://http.debian.net/debian wheezy-backports main
View keybase.md

Keybase proof

I hereby claim:

  • I am juev on github.
  • I am juev (https://keybase.io/juev) on keybase.
  • I have a public key whose fingerprint is D8C1 EB5C 1483 AAE6 FE4B 30C4 E8AD A1A5 5B3C A4EA

To claim this, I am signing this object:

View gist:fdc7fa95eaa488545d5f
-----BEGIN PGP MESSAGE-----
Version: Keybase OpenPGP v1.1.6
Comment: https://keybase.io/crypto
wcBMAxqMQ3EtYEvoAQf/UthWG5rxx0cZiLMAlrMBde36BU+I+8bHMeIrsJMGUOWH
Xg2TwVWmJ8uva9EsmQgbWsqd9lw2vZA5F3CGXn2N0OfbbV8KiZDIPssCgHI5gJk2
hGZ+UmSPNTNvgewgxEqMbvaKB2JEYkDm81M0FUreknpbsEatcfPdJ2F1ooKOsgJG
WxqgPGByBNdreOZJR6J7ntrhx6+m4D0/ua80014G29mNreJQKnkLytMTqZCpSj4v
hTNEkwxZd7FLKDHfWUXqHh0R5ixpiFr41eEcelfrSGGEYFmjQPdZMoxiId6/86Z7
js4Pn+m0CgOOFh2/93M+HE9KpWzov5/CXisCpkiPMcHATAMGFQIV9IILHAEH/AiU
View gist:e1ad38e7c5145524c6bf
-----BEGIN PGP MESSAGE-----
Version: Keybase OpenPGP v1.1.6
Comment: https://keybase.io/crypto
wcBMAwYVAhX0ggscAQf/UbxbRA45WRHWm7Ujq66tMYKwP5rZ30Po7fSXjq4li7Fd
crHE6y+y0yNHA3nL2CjKCLZdAZhpsSXqCXGXUGt+nXFklIET3l1BLLY32BfDPfT+
eLyIt1OtAYEPNujxGoCGgSLnsA9P8RaR/atIx5Ssx+kRiJ9RbNAC0bB2Xa9OXoXD
KdXWGCMnpe+lJqJ+Nke5zBmHbn8zhrgKktRfeY6t7vDXG2gQQ6GImtTiUVpjOaex
dE/lP/k+hAbFkc/1unMPVxnSV1pdd7PxtgqkkZHycvz5FKIafcYUqOOiV1mmHdQr
+E5usXrUrzMk3PdpTf/lva+eWOoj/ZFjpPoo06CwYcHATAMGFQIV9IILHAEH/1p8
View vpnsetup.sh
#!/bin/sh
#
# Amazon EC2 user-data file for automatic configuration of IPsec/L2TP VPN
# on a Ubuntu server instance. Tested with 14.04 (Trusty) AND 12.04 (Precise).
# With minor modifications, this script *can also be used* on dedicated servers
# or any KVM- or XEN-based Virtual Private Server (VPS) from other providers.
#
# DO NOT RUN THIS SCRIPT ON YOUR PC OR MAC! THIS IS MEANT TO BE RUN WHEN
# YOUR AMAZON EC2 INSTANCE STARTS!
#