Skip to content

Instantly share code, notes, and snippets.

Avatar
💭
I may be slow to respond.

Jackie Singh hackingbutlegal

💭
I may be slow to respond.
View GitHub Profile
View FabianPythonScriptToGrabTweetsAnalyzeandPersist
import tweepy
import time
import datetime
import requests
import uuid
import pymongo
from pymongo import MongoClient
def limit_handler(cursor):
View twitter_update_username_w_followers.py
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
View gist:1c34274faf54327e51d06cd32678847d
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 Jun 28, 2020
Grabbing info about a remote site's SSL cert from the command line
View gist:13bbbd7b975d2cbb596773b234c8b645
echo | openssl s_client -showcerts -servername yourdomain[.]com -connect yourdomain[.]com:443 2>/dev/null | openssl x509 -inform pem -noout -text
View Use Python3 to list object methods and print nicely
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 Jul 1, 2019
Bulk Add Twitter Users to a List
View add_twitter_users.py
#!/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 Feb 11, 2019
Convert OS X screencap from mov to gif
View gist:53cf8a21829947c5e131fd995736907f
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 Jan 30, 2019 — forked from taviso/delete-twitter-dm.js
Automate deleting twitter direct messages.
View delete-twitter-dm.js
// 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 Nov 11, 2016
Generate html file from a directory of files. Usage: ./dir2html.sh [path to dir] > index.html
View dir2html.sh
#!/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
View keybase.md

Keybase proof

I hereby claim:

  • I am find-evil on github.
  • I am jacquelinestokes (https://keybase.io/jacquelinestokes) on keybase.
  • I have a public key whose fingerprint is 9F86 7287 B1B7 900C 795C 1D15 9719 9ABB 544E D97E

To claim this, I am signing this object: