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 / 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"
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;
package main
import (
"github.com/andviro/fcgi_client"
"github.com/gin-gonic/gin"
"io/ioutil"
//"log"
"net/http"
"net/http/httputil"
"os"
@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() {
@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