Skip to content

Instantly share code, notes, and snippets.

View ahmdsmir's full-sized avatar
☺️
I may be slow to respond.

Ahmed Samir ahmdsmir

☺️
I may be slow to respond.
View GitHub Profile
@ahmdsmir
ahmdsmir / delete-all-messages.js
Created October 17, 2018 01:07
Delete all your messages in a Discord channel
clearMessages = function (targetType, guild_id, author_id, authToken, deleted = new Set()) {
/*
* Discord: Don't copy stuff into this box
* Me: dOn'T COpy sTuFf iNtO tHIs bOx
*/
const searchURL = `https://discordapp.com/api/v6/${targetType}/${guild_id}/messages/search?author_id=${author_id}&include_nsfw=true`
const headers = { Authorization: authToken }
let clock = 0
interval = 500
function delay(duration) {
@ahmdsmir
ahmdsmir / supermicro-java-console.sh
Last active August 29, 2015 14:27 — forked from DavidWittman/supermicro-java-console.sh
Retrieves the plaintext JNLP for the iKVM console from a SuperMicro IPMI webserver
#!/usr/bin/env bash
# Retrieves the plaintext JNLP from a SuperMicro IPMI webserver
# Usage: supermicro-java-console.sh <hostname>
# supermicro-java-console.sh 10.1.2.34 > login.jnlp
set -x
HOST="$1"
IPMI_USER=${IPMI_USER:-ADMIN}

Keybase proof

I hereby claim:

  • I am ahmdsmir on github.
  • I am excalibur (https://keybase.io/excalibur) on keybase.
  • I have a public key whose fingerprint is 3626 DD23 70C4 00F7 3B9D FC2F 0092 A7C7 ABDB EBF1

To claim this, I am signing this object:

find . -type f -print0 | xargs -0 sed -i 's/"Sting2Find"/"String2ReplaceWith"/g'