Skip to content

Instantly share code, notes, and snippets.

View andviro's full-sized avatar
🐢
I may be slow to respond.

Andrew Rodionoff andviro

🐢
I may be slow to respond.
View GitHub Profile
@andviro
andviro / cVimrc
Last active January 7, 2016 10:59
cvim
set noautofocus
set cncpcompletion
set autoupdategist
set autohidecursor
set nonativelinkorder
let mapleader = ";"
map <A-S-j> moveTabRight
map <A-S-k> moveTabLeft
map J nextTab
map K previousTab
@andviro
andviro / revprox.go
Last active August 29, 2015 14:21 — forked from JalfResi/revprox.go
package main
import(
"log"
"net/url"
"net/http"
"net/http/httputil"
)
func main() {
package main
import (
"github.com/andviro/fcgi_client"
"github.com/gin-gonic/gin"
"io/ioutil"
//"log"
"net/http"
"net/http/httputil"
"os"
var saveData = (function () {
var a = document.createElement("a");
document.body.appendChild(a);
a.style = "display: none";
return function (data, fileName) {
var json = JSON.stringify(data),
blob = new Blob([json], {type: "octet/stream"}),
url = window.URL.createObjectURL(blob);
a.href = url;
a.download = fileName;
@andviro
andviro / uri.js
Last active August 26, 2015 07:04 — forked from jlong/uri.js
URI Parsing with Javascript
var parser = document.createElement('a');
parser.href = "http://example.com:3000/pathname/?search=test#hash";
parser.protocol; // => "http:"
parser.hostname; // => "example.com"
parser.port; // => "3000"
parser.pathname; // => "/pathname/"
parser.search; // => "?search=test"
parser.hash; // => "#hash"
parser.host; // => "example.com:3000"
@andviro
andviro / vromerc
Last active October 6, 2015 18:04
" vim: set ft=vim:
set autocomplete_prev=<C-K>
set autocomplete_next=<C-J>
set autocomplete_prev_10=<C-N>
set autocomplete_next_10=<C-P>
map J gt
map K gT
"set disable_autofocus=1
map d dc
unmap dm
@andviro
andviro / protocol-fix.txt
Created February 28, 2017 13:00 — forked from eculver/protocol-fix.txt
How to deal with tmux "protocol version mismatch"
$ tmux attach
protocol version mismatch (client 7, server 6)
$ pgrep tmux
3429
$ /proc/3429/exe attach
@andviro
andviro / _readme.md
Created March 30, 2017 19:10 — forked from steeve/_readme.md
How to cross compile Go with CGO programs for a different OS/Arch

How to cross compile Go with CGO programs for a different OS/Arch

It is possible to compile Go programs for a different OS, even though go build says otherwise.

You'll need:

Setting up HLS live streaming server using NGINX + nginx-rtmp-module on Ubuntu

This guide will explain how to setup your own streaming server on ubuntu.

1. Compile nginx with rtmp module

Firstly, we'll need to compile nginx with the nginx-rtmp-module.

We recommend using this forked module. it's being actively worked on and contains more fixes and improvements over the original one

@andviro
andviro / init.sh
Created March 18, 2019 19:51 — forked from ebuildy/init.sh
echo "auto_prepend_file=/opt/www/proxy.php" >> /etc/php5/cli/php.ini