Skip to content

Instantly share code, notes, and snippets.

View crwilcox's full-sized avatar

Christopher Wilcox crwilcox

View GitHub Profile
@crwilcox
crwilcox / delete_twitter_direct_messages.js
Last active November 15, 2022 14:45
in_my_dms_deleting_all_the_things.
// Open 'Messages', then go to developer tools console, paste this in, and watch it do all the work
function sleep(ms) {
return new Promise(resolve => setTimeout(resolve, ms));
}
while (true) {
// Click first conversation "three dots" for dropdown menu
document.querySelector('[data-testid=conversation] div:has(+svg)').click();
@crwilcox
crwilcox / bigquery_github.py
Last active February 19, 2020 05:17
Scan GitHub using BigQuery
from google.cloud import bigquery
import json
GITHUB_USERNAME = 'crwilcox'
START_DATE = "2019-08-26"
END_DATE = "2020-02-16"
client = bigquery.client.Client()
query = f"""SELECT repository, type, event AS status, COUNT(*) AS count
@crwilcox
crwilcox / repro.js
Created May 31, 2018 16:12
node repro.js create
const assert = require('assert')
const async = require('async')
var pad = require('pad');
const Spanner = require('./src')
const spanner = new Spanner()
const instance = spanner.instance('issue-180-instance')
const database = instance.database('issue-180-database')
const table = database.table('issuetable')
@crwilcox
crwilcox / repro.js
Created May 31, 2018 16:12
Repro.js script for spanner
const assert = require('assert')
const async = require('async')
var pad = require('pad');
const Spanner = require('./src')
const spanner = new Spanner()
const instance = spanner.instance('issue-180-instance')
const database = instance.database('issue-180-database')
const table = database.table('issuetable')
@crwilcox
crwilcox / repro.js
Last active May 31, 2018 16:12
node repro.js create
const assert = require('assert')
const async = require('async')
var pad = require('pad');
const Spanner = require('./src')
const spanner = new Spanner()
const instance = spanner.instance('issue-180-instance')
const database = instance.database('issue-180-database')
const table = database.table('issuetable')
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@crwilcox
crwilcox / PyGitHub_MigrateIssues.py
Created August 19, 2015 00:39
A script to migrate issues with a certain label from one repo to another and close the original issue. There is no error handling. This could very well fail but it worked for what I needed it for.
# Quick and Dirty script to create issues in a new repo and
# close them in the old one. There is no error handling.
# Set these variables as appropriate
GITHUB_ACCESS_TOKEN = 'INSERT ACCESS TOKEN HERE'
SOURCE_REPO = 'Azure/some-source-repo'
DEST_REPO = 'Azure/some-dest-repo'
LABEL_TO_MOVE = 'Interesting Label'
LABEL_TO_LABEL_IN_DEST = 'Migrated from {}'.format(SOURCE_REPO)