Skip to content

Instantly share code, notes, and snippets.

You want to override the tell command, that has also the w and msg aliases by default. The class that will override these commands is MyTellCommand (extends PluginCommand).

To do this, you've to set the original command in a state that allows it to be overriden. Also, aliases will be registered directly, but since all the work was done for the first registration, it's pretty simple.

//We are in the context of a plugin
@nl5887
nl5887 / transfer.fish
Last active March 22, 2022 09:07
Bash and zsh alias for transfer.sh. Transfers files and directories to transfer.sh.
function transfer
if test (count $argv) -eq 0
echo "No arguments specified. Usage:\necho transfer /tmp/test.md\ncat /tmp/test.md | transfer test.md"
return 1
end
## get temporarily filename, output is written to this file show progress can be showed
set tmpfile ( mktemp -t transferXXX )
## upload stdin or file
@falkirks
falkirks / .htaccess
Last active May 5, 2016 11:59
PocketMine-Banners router
RewriteEngine on
RewriteCond %{REQUEST_URI} !=/index.php
RewriteRule !^assets($|/) index.php [L,QSA]
from twisted.words.protocols import irc
from twisted.internet import reactor, protocol, defer
from twisted.python import log
class BetBot(irc.IRCClient):
nickname = "INSERT YOUR TWITCH USERNAME"
password = "oauth: GENERATE YOUR OAUTH TWITCH TOKEN SOMEWHERE"
def connectionMade(self):

Farewell

A few days ago I tweeted and profile-posted this message:

靜雞雞咁我走啦,好似我靜雞雞咁嚟,fing 一 fing 件衫,唔拎走一舊雲。 嗰棵榆樹下面潭水,唔係泉水而係彩虹,喺藻葉之間搓碎,將彩虹咁既夢整沉左

Yes, I am serious about this message. I am leaving (very soon).

/*
This exports vtable entry symbols to a file.
Run this in the IDA Script Command window (File->Script Command...)
Each vtable segment in the output file is separated by an empty line.
*/
#include <idc.idc>
static getPointerAddress(loc)
@svilex
svilex / McpeProxy_README.md
Last active April 22, 2024 08:35
Useful informations about McpeProxy
I received the following comment from a web developer after I told him I wouldn't make his volatile files directory chmod 777 so Apache could write to it.
"777 tends to scare sys admins, so I understand."
Here's my response:
"Yes, it scares us and it should scare you.
"Think of your account like an apartment. If you set your permissions to 777, anyone who can get into the building (onto the server) can make changes: raid your fridge, steal your cat, replace your pillows, or plant evidence pointing to a crime you didn't commit. Even if they did none of those things, you can get skeeved out by the possiblility.
@SOF3
SOF3 / README.md
Last active August 26, 2017 16:23

This is a simple CLI tool for managing phar files easily.

This tool is intended for Windows users using Linux-like shells.

Required executables/commands in the %PATH%:

  • mintty for starting a window that hosts the vim editor
  • vi for editing a temp file from phar v

If php is in the %PATH%, you may put this file in a directory in the %PATH% with or without a file extension, then execute this directly from the shell. For example, I save this as phar in one of the directories in my path variable, so I just execute phar l path/to/file.phar directly on Git Bash.

@dktapps
dktapps / run.php
Last active February 15, 2023 04:52
A basic UDP proxy used to bypass client-side Xbox Live authentication in MCPE 1.2.
<?php
/*
*
* ____ _ _ __ __ _ __ __ ____
* | _ \ ___ ___| | _____| |_| \/ (_)_ __ ___ | \/ | _ \
* | |_) / _ \ / __| |/ / _ \ __| |\/| | | '_ \ / _ \_____| |\/| | |_) |
* | __/ (_) | (__| < __/ |_| | | | | | | | __/_____| | | | __/
* |_| \___/ \___|_|\_\___|\__|_| |_|_|_| |_|\___| |_| |_|_|
*