Skip to content

Instantly share code, notes, and snippets.

@kaissi
kaissi / Exemplo
Created September 25, 2020 20:38
Mapeamento com @MappedSuperclass
@MappedSuperclass
public abstract class Biscoito {
@Id
@Column
protected Long id;
}
@Entity
@kaissi
kaissi / a-running-minishift-with-metrics.md
Created March 9, 2019 14:47 — forked from tyrell/a-running-minishift-with-metrics.md
Running Minishift with Hawkular Metrics Installed

Introduction

A minishift openshift cluster can be created with cluster metrics installed. Although I couldn't find a way to add metrics to an already created minishift VM instance, the steps below helped to get a new instance up and running easily.

Steps

Step 1 - Initialise minishift with metrics.

Create a fresh minishift VM with an openshift cluster using the below command. The --metrics parameter is the only additional thing I had to provide for minishift to start installing cluster metrics and Hawkular.

 $minishift start —metrics
@kaissi
kaissi / web-servers.md
Created May 7, 2018 03:31 — forked from willurd/web-servers.md
Big list of http static server one-liners

Each of these commands will run an ad hoc http static server in your current (or specified) directory, available at http://localhost:8000. Use this power wisely.

Discussion on reddit.

Python 2.x

$ python -m SimpleHTTPServer 8000
@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.

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

@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

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