Skip to content

Instantly share code, notes, and snippets.

@asvinours
asvinours / compile.sh
Created September 10, 2017 17:50
Create heif imagefile from jpeg
apt-get update && \
apt-get install -y \
ffmpeg \
scons \
wget \
git \
binutils \
cpp-5 \
language-pack-en-base \
libacl1 \
@asvinours
asvinours / Makefile_consul
Last active August 10, 2017 18:27
Download, verify and create i386 and amd64 deb package for consul
VERSION=0.9.2
NAME=consul
.PHONY: package build download cleanup verify prepare
build: package cleanup
download: prepare
wget -O consul_$(VERSION)_SHA256SUMS https://releases.hashicorp.com/consul/$(VERSION)/consul_$(VERSION)_SHA256SUMS
wget -O consul_$(VERSION)_linux_amd64.zip https://releases.hashicorp.com/consul/$(VERSION)/consul_$(VERSION)_linux_amd64.zip
@asvinours
asvinours / README.md
Last active October 6, 2017 21:38
Scripts for wg/wrk

Usage

These scripts will help get the best from wg/wrk (https://github.com/wg/wrk)

Example:

$ head useragents.lst 
Mozilla/5.0 (PLAYSTATION 3; 3.55)
Mozilla/5.0 (compatible; MSIE 10.0; Windows NT 6.2; Trident/6.0; Xbox; Xbox One)
Mozilla/5.0 (Windows NT 10.0; Win64; x64; Xbox; Xbox One) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/46.0.2486.0 Safari/537.36 Edge/13.10586
Mozilla/5.0 (PlayStation 4 1.51) AppleWebKit/536.26 (KHTML, like Gecko)
set -g prefix C-a
unbind C-b
set -s escape-time 1
set -g base-index 1
setw -g pane-base-index 1
bind r source-file ~/.tmux.conf \; display "Reloaded!"
bind C-a send-prefix
bind | split-window -h
bind - split-window -v
@asvinours
asvinours / gzip_static.sh
Last active April 14, 2017 15:24
Test for static gzip and brotli pre-compressed files
#!/usr/bin/env bash
LIST_URLS=("/foo.bar");
HOSTS=("example.com");
PROTOCOLS=("http" "https");
for PROTOCOL in ${PROTOCOLS[@]:0};
do
for HOST in ${HOSTS[@]:0};
do