Skip to content

Instantly share code, notes, and snippets.

@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
@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 / 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 / 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 / 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 / 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////////////