Skip to content

Instantly share code, notes, and snippets.

@realies
realies / adminer autologin
Last active April 13, 2020 21:40 — forked from iarp/adminer autologin
A way to allow direct login to adminer
<?php
$_GET["username"] = "";
$_GET["db"] = "database";
function adminer_object() {
class AdminerAutoLogin extends Adminer {
function credentials() {
return array("127.0.0.1", "username", "password");
}
function login($login, $password) {
return true;
@realies
realies / configure.sh
Created October 1, 2018 06:09 — forked from lukicdarkoo/configure.sh
Raspberry Pi: AP + client mode
#!/bin/sh
# The script configures simultaneous AP and Managed Mode Wifi on Raspberry Pi Zero W (should also work on Raspberry Pi 3)
# Usage: curl https://gist.githubusercontent.com/lukicdarkoo/6b92d182d37d0a10400060d8344f86e4/raw | sh -s WifiSSID WifiPass APSSID APPass
# Licence: GPLv3
# Author: Darko Lukic <lukicdarkoo@gmail.com>
# Special thanks to: https://albeec13.github.io/2017/09/26/raspberry-pi-zero-w-simultaneous-ap-and-managed-mode-wifi/
MAC_ADDRESS="$(cat /sys/class/net/wlan0/address)"
CLIENT_SSID="${1}"
CLIENT_PASSPHRASE="${2}"
@realies
realies / waitForKeyElements.js
Created July 29, 2018 16:48 — forked from mjblay/waitForKeyElements.js
A utility function, for Greasemonkey scripts, that detects and handles AJAXed content.
/*--- waitForKeyElements(): A utility function, for Greasemonkey scripts,
that detects and handles AJAXed content. Forked for use without JQuery.
Usage example:
waitForKeyElements (
"div.comments"
, commentCallbackFunction
);
//--- Page-specific function to do what we want when the node is found.
function commentCallbackFunction (element) {
element.text ("This comment changed by waitForKeyElements().");