Skip to content

Instantly share code, notes, and snippets.

View summatix's full-sized avatar

Robert summatix

  • Nomad
View GitHub Profile
@summatix
summatix / remove_hashtags.php
Created December 16, 2014 20:44
PHP: Remove hashtags from a caption
<?php
/**
* Removes hashtags from the given text. Hashtags at the end of the text are removed,
* and hashtags within the text are unhashed.
*
* E.g.
* Case 1: This is an example with lots of hashtags at the end #hash1 #hash2 #hash3 #hash4 #hash5
* Result: This is an example with lots of hashtags at the end
*
@summatix
summatix / autoreply.js
Created September 24, 2017 03:53
Autoresponder for gmail
/*
* Auto-replies to all messages marked with a certain label.
*/
function RespondEmail(e) {
// All messages marked with this label will be auto-replied to
var autorespondLabel = "autorespond";
// The message content is pulled from a saved draft email. draftSubject
// specifies the subject to search for.
@summatix
summatix / sendOnTrigger.js
Created September 24, 2017 17:40
Gmail: Automatically send email on trigger
/**
* Sends an email when a trigger is received.
*/
function RespondEmail(e) {
// All messages marked with this label will trigger a new email to be sent
var triggerLabel = "paymenttrigger";
// The message content is pulled from a saved draft email. draftSubject
// specifies the subject to search for.
@summatix
summatix / .bash_functions.sh
Last active May 8, 2020 21:01
Helper functions I use for ZSH and WSL running on Windows 10
#!/usr/bin/env bash
#
# Helper functions that are intended to be sourced from ~/.zshrc inside WSL for
# Windows.In ~/.zshrc, execute with:
#
# emulate bash -c "source ~/.bash_functions.sh"
#
# Allow GUI apps inside WSL to display inside the X Server running in Windows
// ==UserScript==
// @name Discord Hide Blocked Messages
// @namespace https://github.com/Multarix/Discord-Hide-Blocked-Messages
// @match https://discord.com/*
// @downloadURL https://raw.githubusercontent.com/Multarix/Discord-Hide-Blocked-Messages/master/script.user.js
// @homepageURL https://github.com/Multarix/Discord-Hide-Blocked-Messages
// @supportURL https://github.com/Multarix/Discord-Hide-Blocked-Messages/issues
// @grant none
// @version 2.0
// @author Anonymous