Skip to content

Instantly share code, notes, and snippets.

@zenny
zenny / adminer_setup.sh
Created January 1, 2020 18:29 — forked from zloynemec/adminer_setup.sh
Secure adminer nginx setup
# Secure adminer setup
# Author Taras Kozlov
# download adminer to separate directory
mkdir -p /var/www/admin
cd /var/www/admin
wget http://www.adminer.org/latest.php -O adminer.php
echo '<?php phpinfo(); >' > info.php
sudo -i
@jperkin
jperkin / edgerouter.md
Last active March 25, 2024 13:22
OpenBSD/octeon EdgeRouter Lite

This is a nifty little device for under £100 suitable for a home router.

I am using one running OpenBSD 6.8 for my AAISP PPPoE connection (avoiding the supplied VMG1312-B10A which has a number of issues).

Installation

I bought a SanDisk 16GB USB stick as there were reports the supplied USB stick isn't particularly reliable, plus it's nice to keep it separate in case of backup or selling the device in the future.

Download the OpenBSD miniroot68.img file system and dd(1) it, for example on macOS (assuming /dev/disk2):

@tbutts
tbutts / tmux-migrate-options.py
Last active February 29, 2024 08:11
For tmux configs: Merge deprecated/removed -fg, -bg, and -attr options into the -style option
#!/usr/bin/env python
# vim: set fileencoding=utf-8
#
# USAGE:
# Back up your tmux old config, run the script and redirect stdout to your conf
# file. Example:
#
# $ cp ~/.tmux.conf ~/.tmux.conf.orig
# $ python ./tmux-migrate-options.py ~/.tmux.conf.orig > ~/.tmux.conf
#
@9b
9b / what_runs.py
Created August 26, 2017 03:51
Simple tool to use WhatRuns API to get technologies used on a page. Doesn't submit the page if it's not in the database.
import ast
import datetime
import json
import sys
import requests
import urllib
from tabulate import tabulate
url = "https://www.whatruns.com/api/v1/get_site_apps"
data = {"data": {"hostname": sys.argv[1], "url": sys.argv[1],
@CSaratakij
CSaratakij / .tmux.conf
Last active May 3, 2022 21:23
Tmux's Config that's very close to i3wm (Setting with an idea of using tmux without x-server)
# Config that is very close to a i3 window manager's keybinding.
set -s escape-time 0
setw -g aggressive-resize on
# First remove *all* keybindings
unbind-key -a
# List keys
bind-key ? list-keys
@zloynemec
zloynemec / adminer_setup.sh
Created April 15, 2015 12:29
Secure adminer nginx setup
# Secure adminer setup
# Author Taras Kozlov
# download adminer to separate directory
mkdir -p /var/www/admin
cd /var/www/admin
wget http://www.adminer.org/latest.php -O adminer.php
echo '<?php phpinfo(); >' > info.php
sudo -i