Skip to content

Instantly share code, notes, and snippets.

View SilverCory's full-sized avatar
❄️
Serve chilled. Carbonated.

Cory Redmond SilverCory

❄️
Serve chilled. Carbonated.
View GitHub Profile
#!/usr/bin/env python3
# Download your data dump and place this file in the "messages" folder of your data dump.
# Run it using python
from datetime import datetime, timedelta, timezone
import dateutil.parser
import matplotlib.pyplot as plt
import matplotlib.ticker as ticker
import matplotlib.dates as mdates
import csv
@ducc
ducc / discrimfarmer.go
Last active January 9, 2018 05:19
Changes your discord username to get a sweet mf discrim cunt
package main
import (
"github.com/bwmarrin/discordgo"
"flag"
log "github.com/Sirupsen/logrus"
"fmt"
"time"
"errors"
)
@ducc
ducc / 1README.md
Last active March 15, 2019 15:49
ducclang with js syntax formatting

ducclang is a revolutionary lang!!!!!!

its based on arrays embedded in arrays

simple program

[
    "hello world"
]

this program is just a string that says hello world. it is now at location [0]

@ammario
ammario / ipint.go
Last active April 20, 2024 12:51
Golang IP <-> int conversion
func ip2int(ip net.IP) uint32 {
if len(ip) == 16 {
return binary.BigEndian.Uint32(ip[12:16])
}
return binary.BigEndian.Uint32(ip)
}
func int2ip(nn uint32) net.IP {
ip := make(net.IP, 4)
binary.BigEndian.PutUint32(ip, nn)
@alexkirsz
alexkirsz / sixth-sense.js
Created May 23, 2016 18:56
Core hook of the Facebook Sixth Sense Chrome extension
function getUserId(fbid) {
return fbid.split(':')[1];
}
requireLazy(
['MercuryTypingReceiver', 'MercuryThreads', 'ShortProfiles'],
(MercuryTypingReceiver, MercuryThreads, ShortProfiles) => {
MercuryTypingReceiver
.get()
NAME=$(hostname -f)
TIMESTAMP=$(date +%s)
echo Starting backup on $NAME
mkdir -p ~/backuptmp/
echo Getting iptables...
iptables-save >~/backuptmp/iptables
@ygotthilf
ygotthilf / jwtRS256.sh
Last active May 4, 2024 09:43
How to generate JWT RS256 key
ssh-keygen -t rsa -b 4096 -m PEM -f jwtRS256.key
# Don't add passphrase
openssl rsa -in jwtRS256.key -pubout -outform PEM -out jwtRS256.key.pub
cat jwtRS256.key
cat jwtRS256.key.pub
@jacquerie
jacquerie / foobar.py
Last active October 28, 2023 16:09
How to decode the message at the end of Google Foobar
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import base64
MESSAGE = '''
EUYQGhMMSx0cU0FIU1MCFAQPG01NQ0gTAEICChUGBxZTRVxBSQoZFQYKHQpKSUNURhcVEgoUFR1I
SltDSBkBTRwKEAgQHxFCSkFJDgkJCgoGCkMLAQBGUklUQhMPAgAJCgYLV0MOSR0VAxAaABZBQVRP
TRICCRVIAk5IEg4dVFRfRkYZBgRARBI=
'''
@Schnouki
Schnouki / popcorntime-vpn.sh
Last active January 20, 2024 12:07
OpenVPN for a single application using network namespaces -- helper scripts
#!/usr/bin/env zsh
# Initialize VPN
sudo vpnns up
sudo vpnns start_vpn
# Popcorn time!
sudo ip netns exec frootvpn sudo -u $USER popcorntime
# Cleanup
@sbiffi
sbiffi / putty.bat
Last active March 22, 2024 13:23
The aim of this vbs script is to launch putty using an URL like ssh://login@host directly from a browser. The .bat is almost the same than .vbs but less robust and just their for older systems.
:: This version is not as powerfull as vbs version, please prefere the other one.
:: It's just there if you need a non-visual basic way to perform this.
:: Restrictions:
:: - Password cannot contain a % or finish with @
:: - Chrome adds a / at the end of the URL, not yet managed
:: The aim of this script is to execute putty with parameters like ssh://login@host
:: Installation:
:: - Launch putty.reg to associate ssh:// and telnet:// to this script
:: - Edit the putty path in parameter below like puttyPath="C:\Program Files (x86)\putty.exe"