Skip to content

Instantly share code, notes, and snippets.

kudarap /
Last active Jul 17, 2020
bash script for updating golang
if [ -z "$ver" ]
echo go version required
echo Downloading go version $ver...
kudarap / bpalert.go
Created Jul 1, 2020
dota 2 blog content watcher
View bpalert.go
package main
import (
kudarap / fileserver.go
Created Jul 1, 2020
file serving though local netowk
View fileserver.go
package main
import (
kudarap / Sublime Text win.xml
Last active Apr 14, 2020
JetBrains keymap for windows
View Sublime Text win.xml
<keymap version="1" name="Sublime Text win" parent="Sublime Text">
<action id="ActivateFavoritesToolWindow" />
<action id="ActivateProjectToolWindow" />
<action id="ActivateRunToolWindow" />
<action id="ChangesView.ShelveSilently" />
<action id="DatabaseView.SqlGenerator" />
<action id="DuplicatesForm.SendToLeft" />
<action id="DuplicatesForm.SendToRight" />
<action id="FileChooser.GotoHome" />
<action id="FileChooser.GotoModule" />
kudarap / ImmortalSSE.js
Created Feb 12, 2017
SSE auto-revive connection
View ImmortalSSE.js
export const ImmortalSSE = url => {
let url
let instance
let listeners = []
const timeout = 2000
const create = () => {
if (url == undefined) {
kudarap /
Last active May 31, 2016
OL Server Stack CentOS 6 (run with sudo)
# Apache 2 & PHP 5.6
cd ~
yum update -y
yum install -y httpd httpd-devel
rpm -Uvh
yum install -y php56w php56w-opcache php56w-devel php56w-gd php56w-imap php56w-mcrypt php56w-mysql php56w-pdo php56w-pear
yum install -y php56w-pecl-geoip php56w-pgsql php56w-bcmath php56w-mbstring git
kudarap /
Created Sep 24, 2015
atom updater for linux
wget -q -O /tmp/latest
wget --progress=bar -q ''$(cat /tmp/latest | grep -o -E 'href="([^"#]+)atom-amd64.deb"' | cut -d'"' -f2 | sort | uniq) -O /tmp/atom-amd64.deb -q --show-progress
sudo dpkg -i /tmp/atom-amd64.deb
kudarap /
Last active Sep 14, 2015
back up project files & mysql db
echo 'backing up ...'
# sql dump all
mysqldump -v -u dev -p --all-databases > mysql-`date '+%d-%m-%Y'`.sql
# project files
tar jcvf project-`date '+%d-%m-%Y'`.tar.bz2 /project/
# put all together
tar jcvf backup-`date '+%d-%m-%Y'`.tar.bz2 project-* mysql-*
kudarap /
Last active Sep 9, 2015
install go lang at ease
echo 'go install ...'
tar xvf go1.5.1.linux-amd64.tar.gz;
sudo mv go /usr/local
export PATH=$PATH:/usr/local/go/bin
sudo mkdir /project/go
export GOPATH=/project/go
echo 'done!'
kudarap /
Last active Sep 14, 2015
ubuntu 14 server stack
echo 'updating system ...'
sudo apt-get -y update
sudo apt-get -y upgrade
sudo apt-get -y dist-upgrade
sudo apt-get -y install curl
curl -sL | sudo bash -
curl -sS | sudo php -- --install-dir=bin --filename=composer