Skip to content

Instantly share code, notes, and snippets.

@kaissi
kaissi / tomcat.sh
Created October 20, 2015 13:13 — forked from valotas/tomcat.sh
Tomcat init.d script
#!/bin/bash
#
# tomcat7 This shell script takes care of starting and stopping Tomcat
#
# chkconfig: - 80 20
#
### BEGIN INIT INFO
# Provides: tomcat7
# Required-Start: $network $syslog
# Required-Stop: $network $syslog
@kaissi
kaissi / SetupInnoSetupPostgreSql.iss
Created November 13, 2015 16:52 — forked from levymoreira/SetupInnoSetupPostgreSql.iss
Exemplo Setup (INNO SETUP) instalação PostgreSql no Windows
; Levy Moreira - 12/04/2012
#define MyAppName "Program"
#define MyAppVersion "1.0"
#define MyAppPublisher "NextTi"
#define MyAppURL "http://www.nextti.com/"
#define MyAppExeName "Program.jar"
[Setup]
; NOTE: The value of AppId uniquely identifies this application.
@kaissi
kaissi / update_curl.sh
Created October 14, 2016 20:10 — forked from fideloper/update_curl.sh
Update curl on Ubuntu 14.04
#! /usr/bin/env bash
# Install any build dependencies needed for curl
sudo apt-get build-dep curl
# Get latest (as of Feb 25, 2016) libcurl
mkdir ~/curl
cd ~/curl
wget http://curl.haxx.se/download/curl-7.50.2.tar.bz2
tar -xvjf curl-7.50.2.tar.bz2
@kaissi
kaissi / unit.sh
Created February 28, 2017 16:36 — forked from tvlooy/unit.sh
Bash test: get the directory of a script
#!/bin/bash
function test {
MESSAGE=$1
RECEIVED=$2
EXPECTED=$3
if [ "$RECEIVED" = "$EXPECTED" ]; then
echo -e "\033[32m✔︎ Tested $MESSAGE"
else
@kaissi
kaissi / haproxy.cfg
Created March 7, 2017 19:42 — forked from thisismitch/haproxy.cfg
Let's Encrypt Auto-Renewal script for HAProxy
global
log /dev/log local0
log /dev/log local1 notice
chroot /var/lib/haproxy
stats socket /run/haproxy/admin.sock mode 660 level admin
stats timeout 30s
user haproxy
group haproxy
daemon
maxconn 2048
@kaissi
kaissi / bbs.js
Created August 22, 2017 01:21 — forked from TooTallNate/bbs.js
Running a node.js REPL over `curl`
/**
* Requires node v0.7.7 or greater.
*
* To connect: $ curl -sSNT. localhost:8000
*/
var http = require('http')
, repl = require('repl')
, buf0 = new Buffer([0])
@kaissi
kaissi / repl-client.js
Created August 22, 2017 01:21 — forked from TooTallNate/repl-client.js
Running a "full-featured" REPL using a net.Server and net.Socket
var net = require('net')
var sock = net.connect(1337)
process.stdin.pipe(sock)
sock.pipe(process.stdout)
sock.on('connect', function () {
process.stdin.resume();
process.stdin.setRawMode(true)

Keybase proof

I hereby claim:

  • I am kaissi on github.
  • I am kaissi (https://keybase.io/kaissi) on keybase.
  • I have a public key ASBoVSRaZ3U4EW1QmalWVMyMbGVSNtLqQWZReZ5wjqH4Gwo

To claim this, I am signing this object:

@kaissi
kaissi / ubuntu_agnoster_install.md
Created March 16, 2018 12:03 — forked from renshuki/ubuntu_agnoster_install.md
Ubuntu 16.04 + Terminator + Oh My ZSH with Agnoster Theme

Install Terminator (shell)

sudo add-apt-repository ppa:gnome-terminator
sudo apt-get update
sudo apt-get install terminator

Terminator should be setup as default now. Restart your terminal (shortcut: "Ctrl+Alt+T").

Install ZSH

@kaissi
kaissi / curl.md
Created March 30, 2018 11:23 — forked from subfuzion/curl.md
curl POST examples

Common Options

-#, --progress-bar Make curl display a simple progress bar instead of the more informational standard meter.

-b, --cookie <name=data> Supply cookie with request. If no =, then specifies the cookie file to use (see -c).

-c, --cookie-jar <file name> File to save response cookies to.