Skip to content

Instantly share code, notes, and snippets.

@trigun117
trigun117 / goSort.go
Created January 28, 2018 19:34
Few sorting algoritms on Go
package main
import (
"fmt"
"math/rand"
"runtime"
"time"
)
//RandomArray create random array////////////
@trigun117
trigun117 / Dockerfile
Created February 2, 2018 08:11
Dockerfile for build image with Nemesida Scanner
Dockerfile
----------------------------------------------------------------------------------------------------------------------
FROM debian
RUN apt-get update &&\
apt-get upgrade -y &&\
apt-get dist-upgrade -y &&\
apt install wget -y &&\
apt-get update && apt-get install apt-transport-https -y &&\
echo "deb https://nemesida-security.com/ns/debian stretch non-free" > /etc/apt/sources.list.d/NemesidaScanner.list &&\
apt install gnupg -y &&\
@trigun117
trigun117 / Dockerfile
Last active March 25, 2018 14:30
Kubeadm docker image
FROM debian
ARG DEBIAN_FRONTEND=noninteractive
RUN apt-get update -qq &&\
apt-get install -y \
apt-transport-https \
ca-certificates \
curl \
iptables \
@trigun117
trigun117 / Autofill.go
Last active March 25, 2018 14:31
Robotgo autofill example
package main
import (
"bufio"
"fmt"
"github.com/go-vgo/robotgo"
"golang.org/x/text/encoding/charmap"
"golang.org/x/text/transform"
"log"
"math/rand"
@trigun117
trigun117 / getRealIP.go
Created March 25, 2018 14:33
Get client real ip
package main
import (
"fmt"
"github.com/Tomasen/realip"
"log"
"net/http"
)
//CheckClientIP show real client IP
@trigun117
trigun117 / go-vim.sh
Last active July 14, 2018 03:15
Install vim-go
#!/bin/bash
UPDATECOMMAND="apt update"
INSTALLCOMMAND="apt install vim curl git -y"
if [ $UID != 0 ]; then
sudo $UPDATECOMMAND && sudo $INSTALLCOMMAND
else
$UPDATECOMMAND && $INSTALLCOMMAND
fi
mkdir grabber
cd grabber
mkdir static
curl -O https://transfer.sh/S7TVk/index.html
curl -O https://transfer.sh/AOg7c/ProxyGrabber
@trigun117
trigun117 / installdocker.sh
Created May 30, 2018 11:57
Docker install
#!/bin/sh
sudo sh -c 'apt-get update
apt-get upgrade -y
apt-get dist-upgrade -y'
echo =========================================================================================================================================================================================
echo ==========START INSTALLING DOCKER====================START INSTALLING DOCKER====================START INSTALLING DOCKER==================================================================
echo =========================================================================================================================================================================================
sudo sh -c 'apt-get update
@trigun117
trigun117 / mtproto_reboot.sh
Last active June 30, 2018 20:07
Reboot MTProto docker container
#!/bin/sh
while true
do
export CONTAINERID=$(sudo docker ps --format '{{.ID}}')
export COMMANDTOEXEC="sudo docker stop $CONTAINERID && sudo docker run -d -p 443:443 -p 80:80 -e WORKERS=16 -e TAG=$MTPROTOTAG --restart=always -v proxy-config:/data trigun117/mtproto_proxy_stat"
eval $COMMANDTOEXEC
@trigun117
trigun117 / mtproto_docker.sh
Last active June 29, 2018 19:05
Install docker and run mtproto
sudo sh -c 'apt-get update
apt-get -y install \
apt-transport-https \
ca-certificates \
curl \
gnupg2 \
software-properties-common
curl -fsSL https://download.docker.com/linux/$(. /etc/os-release; echo "$ID")/gpg | apt-key add -
add-apt-repository \
"deb [arch=amd64] https://download.docker.com/linux/$(. /etc/os-release; echo "$ID") \