Skip to content

Instantly share code, notes, and snippets.

@DarthJahus
DarthJahus / slack_delete_messages.js
Created March 5, 2019 22:06
NodeJS script to delete messages in a Slack channel.
#!/usr/bin/env node
// Channel ID is on the the browser URL.: https://mycompany.slack.com/messages/MYCHANNELID/
// Pass it as a parameter: node ./delete-slack-messages.js CHANNEL_ID
// CONFIGURATION #######################################################################################################
const token = ''; // You can learn it from: https://api.slack.com/custom-integrations/legacy-tokens
// GLOBALS #############################################################################################################
@echo off
if not DEFINED IS_MINIMIZED set IS_MINIMIZED=1 && start "" /min %~dpnx0 %* && exit
echo Switching to extended mode
displayswitch.exe /extend
echo openning %* in VLC
timeout 5
"C:\Program Files\VideoLAN\VLC\vlc.exe" --started-from-file %*
echo Switching to external mode
displayswitch.exe /external
exit
Windows Registry Editor Version 5.00
[HKEY_CLASSES_ROOT\Applications\cvlc.bat]
"FriendlyAppName"="VLC (Custom)"
[HKEY_CLASSES_ROOT\Applications\cvlc.bat\DefaultIcon]
@="\"C:\\Program Files\\VideoLAN\\VLC\\vlc.exe\",0"
[HKEY_CLASSES_ROOT\Applications\cvlc.bat\shell]
@DarthJahus
DarthJahus / HexToRGB.py
Created November 22, 2018 10:35
Simple Python script to convert hexadecimal color codes to RGB
"""
Simple Python script to convert hexadecimal color codes to RGB
Jahus, 2018-11-21
"""
while True:
try:
print("Hex?")
@DarthJahus
DarthJahus / discord_delete_messages.js
Created October 13, 2018 22:50
Delete personal messages, direct messages, private chat in Discord.
// by @ordubis
var authToken = 'AUTHORISATION_TOKEN_HERE'
if (typeof(blockedAuthors) === 'undefined') {
var blockedAuthors = []
}
clearMessages = function() {
const channel = window.location.href.split('/').pop()
Verifying my identity on Peepeth.com 0xd0e429d6769d6ac6b307a4a230130962bc1bf10d
@DarthJahus
DarthJahus / outline-server-setup.md
Created June 23, 2018 10:28 — forked from okeehou/outline-server-setup.md
How to setup an Outline VPN Server on Ubuntu 16.04

How to setup an Outline VPN Server on Ubuntu 16.04 Server

This guide will show you how to install Outline Server on an Ubuntu 16.04 Server, use Outline Manager for Windows and connect to your Outline Server on Windows and Anroid.

Install Outline Manager

Outline Manager supports Windows, macOS and Linux.

Outline Manager for Windows

@DarthJahus
DarthJahus / RPC-test-script.py
Created March 5, 2018 13:04
Simple RPC calls script
# Jahus, 2018-01-28
import requests
import json
from functools import partial
class MethodMissing:
def method_missing(self, name, *args, **kwargs):
print("Command %s with args %s and additional args %s" % (name, args, kwargs))
@DarthJahus
DarthJahus / gist:b99284d2fdabea59343cdb6aad4911ce
Created January 28, 2018 14:59 — forked from gterzian/gist:6400170
Ruby's method_missing in Python...
import unittest
from functools import partial
class MethodMissing:
def method_missing(self, name, *args, **kwargs):
'''please implement'''
raise NotImplementedError('please implement a "method_missing" method')
def __getattr__(self, name):
return partial(self.method_missing, name)
@DarthJahus
DarthJahus / whois.ps1
Created November 2, 2017 23:52
Whois command for PowerShell
<#
.SYNOPSIS
Domain name WhoIs
.DESCRIPTION
Performs a domain name lookup and returns information such as
domain availability (creation and expiration date),
domain ownership, name servers, etc.
.PARAMETER domain