Skip to content

Instantly share code, notes, and snippets.

@realies
realies / compact-messenger.user.js
Created Feb 7, 2020
making the messenger side-bar always narrow
View compact-messenger.user.js
// ==UserScript==
// @name Compact Messenger
// @version 0.1
// @match https://www.messenger.com/*
// @grant GM_xmlhttpRequest
// @grant GM_addStyle
// ==/UserScript==
const targetCSS = document.querySelector("link[href*='FD_uqE-4yZN.css']");
GM_xmlhttpRequest({
method: "GET",
@realies
realies / adminer autologin
Last active Apr 13, 2020 — forked from iarp/adminer autologin
A way to allow direct login to adminer
View adminer autologin
<?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 Oct 1, 2018 — forked from lukicdarkoo/configure.sh
Raspberry Pi: AP + client mode
View configure.sh
#!/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 Jul 29, 2018 — forked from mjblay/waitForKeyElements.js
A utility function, for Greasemonkey scripts, that detects and handles AJAXed content.
View waitForKeyElements.js
/*--- 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().");
You can’t perform that action at this time.