Skip to content

Instantly share code, notes, and snippets.

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

Jackie Singh hackingbutlegal

💭
I may be slow to respond.
View GitHub Profile
// THANK YOU 0xBANANA FOR THIS SOLANA NFT EDITION MINTER
// RUN THIS WITH 'node main.mjs' AT YOUR COMMAND LINE
import { Metaplex, keypairIdentity } from "@metaplex-foundation/js";
import { TokenStandard } from '@metaplex-foundation/mpl-token-metadata'
import { Connection, Keypair } from "@solana/web3.js";
import bs58 from "bs58";
const connection = new Connection(
"https://rpc.helius.xyz/?api-key=YOUR_API_KEY_GOES_HERE"
import tweepy
import time
import datetime
import requests
import uuid
import pymongo
from pymongo import MongoClient
def limit_handler(cursor):
@hackingbutlegal
hackingbutlegal / twitter_update_username_w_followers.py
Created July 9, 2020 18:55 — forked from echohtp/twitter_update_username_w_followers.py
Easy update twitter username w/ followers count
import os
import tweepy
from flask import Flask
# Authenticate to Twitter
auth = tweepy.OAuthHandler("API KEY", "API SECRET")
auth.set_access_token("TOKEN", "SECRET")
# Create API object
function deleteNextConversation()
{
if (!(dm = document.getElementsByClassName("DMInbox-conversationItem")[0])) {
clearInterval(tmr)
return;
}
dm.firstChild.click();
setTimeout('document.getElementsByClassName("js-actionDeleteConversation")[0].click()', 1000);
setTimeout('document.getElementById("confirm_dialog_submit_button").click()', 2000);
@hackingbutlegal
hackingbutlegal / gist:13bbbd7b975d2cbb596773b234c8b645
Created June 28, 2020 18:13
Grabbing info about a remote site's SSL cert from the command line
echo | openssl s_client -showcerts -servername yourdomain[.]com -connect yourdomain[.]com:443 2>/dev/null | openssl x509 -inform pem -noout -text
import YOUR_LIBRARY_HERE
def get_methods(object, spacing=20):
methodList = []
for method_name in dir(object):
try:
if callable(getattr(object, method_name)):
methodList.append(str(method_name))
except:
methodList.append(str(method_name))
@hackingbutlegal
hackingbutlegal / add_twitter_users.py
Created July 1, 2019 21:03
Bulk Add Twitter Users to a List
#!/usr/bin/env python3
import tweepy
import pandas as pd
# Config
consumer_key = 'xxx'
consumer_secret = 'xxx'
access_token = 'xxx'
access_token_secret = 'xxx'
list_name = 'blockList'
@hackingbutlegal
hackingbutlegal / gist:53cf8a21829947c5e131fd995736907f
Created February 11, 2019 23:35
Convert OS X screencap from mov to gif
ffmpeg -i in.mov -s 600x400 -pix_fmt rgb24 -r 10 -f gif - | gifsicle --optimize=3 --delay=3 > out.gif
@hackingbutlegal
hackingbutlegal / delete-twitter-dm.js
Created January 30, 2019 16:15 — forked from taviso/delete-twitter-dm.js
Automate deleting twitter direct messages.
// Open direct messages window, paste this into console.
function deleteNextConversation()
{
if (!(dm = document.getElementsByClassName("DMInbox-conversationItem")[0])) {
clearInterval(tmr)
return;
}
dm.firstChild.click();
setTimeout('document.getElementsByClassName("js-actionDeleteConversation")[0].click()', 1000);
@hackingbutlegal
hackingbutlegal / dir2html.sh
Last active November 11, 2016 17:09
Generate html file from a directory of files. Usage: ./dir2html.sh [path to dir] > index.html
#!/bin/bash
# usage: dir2html.sh [dir] > index.html
INDEX=`ls -1 $1 | sed "s/^.*/ <li\>\<a\ href=\"&\"\>&\<\\/a\>\<\\/li\>/"`
echo "<html>
<head><title>Index of $1</title></head>
<body>
<h2>Index of $1</h2>
<hr>
<ui>
$INDEX