Skip to content

Instantly share code, notes, and snippets.

@kenshin17
kenshin17 / nginx.conf
Created June 17, 2016 05:27 — forked from plentz/nginx.conf
Best nginx configuration for improved security(and performance). Complete blog post here http://tautt.com/best-nginx-configuration-for-security/
# to generate your dhparam.pem file, run in the terminal
openssl dhparam -out /etc/nginx/ssl/dhparam.pem 2048
@kenshin17
kenshin17 / rpm-digital-signature.sh
Created October 10, 2016 02:13 — forked from fernandoaleman/rpm-digital-signature.sh
How to sign your custom RPM package with GPG key
# How to sign your custom RPM package with GPG key
# Step: 1
# Generate gpg key pair (public key and private key)
#
# You will be prompted with a series of questions about encryption.
# Simply select the default values presented. You will also be asked
# to create a Real Name, Email Address and Comment (comment optional).
#
# If you get the following response:
@kenshin17
kenshin17 / tmux.md
Created October 14, 2016 04:20 — forked from andreyvit/tmux.md
tmux cheatsheet

tmux cheat sheet

(C-x means ctrl+x, M-x means alt+x)

Prefix key

The default prefix is C-b. If you (or your muscle memory) prefer C-a, you need to add this to ~/.tmux.conf:

remap prefix to Control + a

@kenshin17
kenshin17 / ip_blacklist.lua
Created October 31, 2016 02:49 — forked from chrisboulton/ip_blacklist.lua
Redis based IP blacklist for Nginx (LUA)
-- a quick LUA access script for nginx to check IP addresses against an
-- `ip_blacklist` set in Redis, and if a match is found send a HTTP 403.
--
-- allows for a common blacklist to be shared between a bunch of nginx
-- web servers using a remote redis instance. lookups are cached for a
-- configurable period of time.
--
-- block an ip:
-- redis-cli SADD ip_blacklist 10.1.1.1
-- remove an ip:
@kenshin17
kenshin17 / latest-ffmpeg-centos6.sh
Created December 1, 2016 04:09 — forked from mustafaturan/latest-ffmpeg-centos6.sh
Installs latest ffmpeg on Centos 6
# source: https://trac.ffmpeg.org/wiki/CentosCompilationGuide
yum install autoconf automake gcc gcc-c++ git libtool make nasm pkgconfig zlib-devel
mkdir ~/ffmpeg_sources
cd ~/ffmpeg_sources
curl -O http://www.tortall.net/projects/yasm/releases/yasm-1.2.0.tar.gz
tar xzvf yasm-1.2.0.tar.gz
cd yasm-1.2.0
@kenshin17
kenshin17 / nmap-cmdline
Created May 15, 2017 09:26 — forked from Neo23x0/nmap-cmdline
Nmap Scan Params for CVE-2017-0143 MS17-010 Scanning
# Scan for CVE-2017-0143 MS17-010
# The vulnerability used by WannaCry Ransomware
#
# 1. Use @calderpwn's script
# http://seclists.org/nmap-dev/2017/q2/79
#
# 2. Save it to Nmap NSE script directory
# Linux - /usr/share/nmap/scripts/ or /usr/local/share/nmap/scripts/
# OSX - /opt/local/share/nmap/scripts/
#
@kenshin17
kenshin17 / eternalblue7_exploit.py
Created May 19, 2017 02:35 — forked from worawit/eternalblue7_exploit.py
Eternalblue exploit for Windows 7/2008
#!/usr/bin/python
from impacket import smb
from struct import pack
import os
import sys
import socket
'''
EternalBlue exploit for Windows 7/2008 by sleepya
The exploit might FAIL and CRASH a target system (depended on what is overwritten)

install kubernetes 1.6 on centos 7.3

Install kubelet, kubeadm, docker, kubectl and kubernetes-cni

1. Install Yum Repo

cat <<EOF > /etc/yum.repos.d/kubernetes.repo
[kubernetes]
name=Kubernetes
baseurl=http://yum.kubernetes.io/repos/kubernetes-el7-x86_64
@kenshin17
kenshin17 / Mina WordPress deploy
Created June 14, 2017 02:57 — forked from schikulski/Mina WordPress deploy
Mina WordPress deploy config
require 'mina/git' # Require mina/git
set :term_mode, nil # Bug in OS X that makes the password promp kinda fishy...
set :domain, 'example.com' # The web servers SSH domain
set :deploy_to, '/home/user/my-site' # Full path to where you want Mina to deploy
set :repository, 'https://USERNAME@bitbucket.org/USERNAME/REPOSITORY.git' # The git repository Mina shall use
set :branch, 'master' # What git branch Mina should get
set :user, 'username' # What username to connect with through SSH
set :current_path, 'www' # What file should be the current version. Probably 'www', 'public_html' or perhaps 'current'.
@kenshin17
kenshin17 / elasticsearch-alterting.md
Created August 19, 2017 02:01 — forked from daniellavoie/elasticsearch-alterting.md
Alerting for Elasticsearch