Skip to content

Instantly share code, notes, and snippets.

View gitty8's full-sized avatar
I may be slow to respond.


I may be slow to respond.
View GitHub Profile
gitty8 / gmail_to_slack.js
Created April 18, 2020 15:49 — forked from andrewmwilson/gmail_to_slack.js
Google Apps Script: Send Gmail emails to Slack
// You will also need to create a gmail filter to add the 'send-to-slack' label
// to any emails you want sent to slack
function sendEmailsToSlack() {
var label = GmailApp.getUserLabelByName('send-to-slack');
var messages = [];
var threads = label.getThreads();
for (var i = 0; i < threads.length; i++) {
messages = messages.concat(threads[i].getMessages())
gitty8 / delete-all-messages.js
Created January 7, 2018 23:22 — forked from niahoo/delete-all-messages.js
Delete all messages in a Discord channel
// Paste your token between the quotes :
var authToken = '________________________________________'
!function(t,e){function n(t){return t&&e.XDomainRequest&&!/MSIE 1/.test(navigator.userAgent)?new XDomainRequest:e.XMLHttpRequest?new XMLHttpRequest:void 0}function o(t,e,n){t[e]=t[e]||n}var r=["responseType","withCredentials","timeout","onprogress"];t.ajax=function(t,a){function s(t,e){return function(){c||(a(void 0===f.status?t:f.status,0===f.status?"Error":f.response||f.responseText||e,f),c=!0)}}var u=t.headers||{},i=t.body,d=t.method||(i?"POST":"GET"),c=!1,f=n(t.cors);,t.url,!0);var l=f.onload=s(200);f.onreadystatechange=function(){4===f.readyState&&l()},f.onerror=s(null,"Error"),f.ontimeout=s(null,"Timeout"),f.onabort=s(null,"Abort"),i&&(o(u,"X-Requested-With","XMLHttpRequest"),e.FormData&&i instanceof e.FormData||o(u,"Content-Type","application/x-www-form-urlencoded"));for(var p,m=0,v=r.length;v>m;m++)p=r[m],void 0!==t[p]&&(f[p]=t[p]);for
gitty8 / stop_badrabbit.bat
Last active October 30, 2017 09:41 — forked from bantya/stop_badrabbit.bat
bat: Stop BadRabbit Ransomeware
@echo off
:: For BadRabbit
type NUL > c:\windows\cscc.dat
type NUL > c:\windows\infpub.dat
icacls "c:\windows\cscc.dat" /inheritance:r /remove Administrators
icacls "c:\windows\infpub.dat" /inheritance:r /remove Administrators
:: For Petya/NotPetya/SortaPetya
type NUL > c:\windows\perfc.dll
type NUL > c:\windows\perfc.dat
gitty8 / coin-hive.txt
Created October 5, 2017 08:19 — forked from PaulSec/coin-hive.txt
Extract from the Top 1M Alexa domains (and also from investigations) using coin-hive mining service
gitty8 / dnsmasq_clean_message
Created April 17, 2017 12:04 — forked from jalogisch/dnsmasq_clean_message
pi-hole / dnsmasq pipeline rules to use with graylog pipeline rules
rule "dnsmasq clean message"
has_field("programname") AND contains(to_string($message.programname), "dnsmasq")
let m = regex("^.+: (.+)$", to_string($message.message));
let clean_message = m["0"];
// Set a better message field without the prefix clutter.
set_field("message", clean_message);