Skip to content

Instantly share code, notes, and snippets.

@bazi
bazi / first
Created January 19, 2015 11:21
Some gist
Hello Gist World!
@bazi
bazi / MultipartSignedTemplateEngine
Created March 26, 2015 15:29
A try to implement MIME multipart/signed content type generator aka template engine in Ninja framework
package controllers.helper;
import java.io.ByteArrayInputStream;
import java.io.ByteArrayOutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
import java.util.Base64;
import java.util.UUID;
@bazi
bazi / keybase.md
Last active June 16, 2016 11:53
Keybase proof

Keybase proof

I hereby claim:

  • I am bazi on github.
  • I am azilet (https://keybase.io/azilet) on keybase.
  • I have a public key whose fingerprint is 791F 1BDC 9C50 54D2 CED1 5D72 2515 193D E2DB 58B4

To claim this, I am signing this object:

@bazi
bazi / key_binding.sh
Last active March 18, 2017 17:04
Disable key binding in Ubuntu (Unity)
# to disable default key bindings, here Alt+F7(move window) and Alt+F8(resize window)
gsettings set org.gnome.desktop.wm.keybindings begin-resize []
gsettings set org.gnome.desktop.wm.keybindings begin-move []
# to revert
gsettings reset org.gnome.desktop.wm.keybindings begin-move
gsettings reset org.gnome.desktop.wm.keybindings begin-resize
@bazi
bazi / java.gitignore
Last active October 21, 2019 17:39
gitignore file for java projects
target/
logs/
# virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml
hs_err_pid*
# jetbrains related ignores
.idea/
@bazi
bazi / ssl_configuration.md
Last active June 30, 2016 05:58
Generating certificates and keys for SSL to used in Jetty

Generate key pair, pass phrase will be asked

openssl genrsa -aes128 -out jetty.key

Generate a certificate for the key generated above (you should know the pass phrase for the key). You will be asked to enter some info about you/your org to build a Distinguished Name (DN). The only mandatory response to provide is the fully qualified host name of the server at the "Common Name". Note that i used -days 365 option to make certificate valid for one year, change as needed

@bazi
bazi / bash_aliases.bash
Last active September 18, 2019 15:02
Configuration files
# some more ls aliases
alias ll='ls -lGF'
alias la='ls -AG'
# commented out in preference to using GREP_OPTIONS
#alias grep='grep --color=auto'
#alias fgrep='fgrep --color=auto'
#alias egrep='egrep --color=auto'
@bazi
bazi / vimrc
Last active September 29, 2020 12:23
my vimrc
" settings for vim
" 2016-20xx, Azilet
"
" set tab width and replace it with spaces
set tabstop=4
set shiftwidth=4
set expandtab
set nu
set ruler " not set on macos