Skip to content

Instantly share code, notes, and snippets.

Vadim Kulibaba recoilme

Block or report user

Report or block recoilme

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View freecache.go
package main
import (
"errors"
"flag"
"fmt"
"log"
"net"
"net/textproto"
"os"
View gist:a574385519220713b9ae060ab306a330
package main
import (
"fmt"
"io"
"io/ioutil"
"log"
"strings"
"time"
View css-glitched-text.markdown
@recoilme
recoilme / checkTelegramAuthorization.go
Created Feb 14, 2018
Check Telegram Authorization in golang
View checkTelegramAuthorization.go
// check telegram authorization on golang
//php version: https://gist.github.com/anonymous/6516521b1fb3b464534fbc30ea3573c2#file-check_authorization-php
//usage:
/*
func TestTg(t *testing.T) {
data := "id=1263310&first_name=Vadim&last_name=Kulibaba&username=recoilme&photo_url=https://t.me/i/userpic/320/recoilme.jpg&auth_date=1518535618&hash=1d7069137bf517a63261ee156919a057dca93a416118eebfd0d8f5697442cdce"
token := "YOUR:TOKEN"
if !checkTelegramAuthorization(data, token) {
t.Fail()
}
@recoilme
recoilme / index.html
Last active Nov 20, 2017
startupoftheday
View index.html
<!doctype html>
{{ $host := .Host}}
<html class="no-js" lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="x-ua-compatible" content="ie=edge">
<title>Стартап дня - #стартапдня</title>
<meta name="description" content="{{.Description}}">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="robots" content="all">
@recoilme
recoilme / async_fetcher.go
Last active May 25, 2017
async url fetcher with timeouts
View async_fetcher.go
package main
import (
"fmt"
"io/ioutil"
"log"
"net/http"
"time"
)
@recoilme
recoilme / ibolt.go
Created Apr 27, 2017
Rest api to bolt db
View ibolt.go
/*
Rest api 2 boltdb
PUT:
# params
host/database/backet/key
and value in body
curl -X PUT -H "Content-Type: application/octet-stream" --data-binary "@durov.jpg" localhost:5000/bolt/images/durov
curl -X PUT -H "Content-Type: text/html" -d '{"username":"xyz","password":"xyz"}' localhost:5000/bolt/users/user1
View gist:3a11dbd172c2db85b8f23e36bee244f0
+ PUDGEDIR=/var/lib/pudge
+ BACKUPDIR=/mnt/disk1/bckp/pudge
++ date +%Y%m%d-%H%M
+ DATE=20170210-0610
+ THR=600
+ THR2=60
+ '[' -d /var/lib/pudge/backup ']'
+ '[' -d /mnt/disk1/bckp/pudge ']'
++ printf 'env getint backup.last\n'
You can’t perform that action at this time.