Skip to content

Instantly share code, notes, and snippets.

View Gitart's full-sized avatar
🎨
Working from home

Arthur Savage Gitart

🎨
Working from home
  • ART TECH
  • Ukraine
  • 04:23 (UTC +03:00)
View GitHub Profile
@Gitart
Gitart / 0_reuse_code.js
Last active August 29, 2015 14:15
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
@Gitart
Gitart / read_line.go
Last active June 26, 2018 18:47 — forked from kendellfab/read_line.go
Golang --> Read file line by line.
func readLine(path string) {
inFile, _ := os.Open(path)
defer inFile.Close()
scanner := bufio.NewScanner(inFile)
scanner.Split(bufio.ScanLines)
for scanner.Scan() {
fmt.Println(scanner.Text())
}
}
@Gitart
Gitart / http-proxy.go
Created September 25, 2018 10:14 — forked from fabrizioc1/http-proxy.go
Http proxy server in Go
package main
import (
"fmt"
"io"
"log"
"net/http"
)
type HttpConnection struct {
@Gitart
Gitart / redis_failover_proxy.go
Created September 25, 2018 10:15 — forked from fabrizioc1/redis_failover_proxy.go
Redis Failover Proxy
package main
import (
"fmt"
"log"
"net"
"sync"
"time"
"strings"
"runtime"
@Gitart
Gitart / HttpProxy.go
Created September 25, 2018 10:19 — forked from yowu/HttpProxy.go
A simple HTTP proxy by Golang
package main
import (
"flag"
"io"
"log"
"net"
"net/http"
"strings"
)
@Gitart
Gitart / update_curl.sh
Created September 25, 2018 13:21 — forked from fideloper/update_curl.sh
Update curl on Ubuntu 14.04
#! /usr/bin/env bash
# Install any build dependencies needed for curl
sudo apt-get build-dep curl
# Get latest (as of Feb 25, 2016) libcurl
mkdir ~/curl
cd ~/curl
wget http://curl.haxx.se/download/curl-7.50.2.tar.bz2
tar -xvjf curl-7.50.2.tar.bz2
@Gitart
Gitart / main_1.go
Created January 17, 2019 11:50 — forked from pseudomuto/main_1.go
Blog Code: Clean SQL Transactions in Golang
package main
import (
"database/sql"
"log"
)
func main() {
db, err := sql.Open("VENDOR_HERE", "YOUR_DSN_HERE")
handleError(err)
@Gitart
Gitart / ipfs_example.go
Created January 24, 2019 15:51 — forked from miguelmota/ipfs_example.go
Golang IPFS shell/cli example
package ipfsutil
import (
"bytes"
"fmt"
"io"
"log"
"time"
ipfs "github.com/ipfs/go-ipfs-api"