Skip to content

Instantly share code, notes, and snippets.

View dezren39's full-sized avatar
🕵️‍♂️
Processing..

Drewry Pope dezren39

🕵️‍♂️
Processing..
View GitHub Profile

Keybase proof

I hereby claim:

  • I am dezren39 on github.
  • I am drewrypope (https://keybase.io/drewrypope) on keybase.
  • I have a public key ASCz4mri2M84GB9_JstFmXkKWavd_TGzBF4NOJLFmmhFHQo

To claim this, I am signing this object:

Keybase proof

I hereby claim:

  • I am dezren39 on github.
  • I am dezren39 (https://keybase.io/dezren39) on keybase.
  • I have a public key whose fingerprint is 824D BF5B 4CA5 D67B AB62 44D3 4E1A 7FD8 8A16 19B2

To claim this, I am signing this object:

@dezren39
dezren39 / android-websters.md
Created April 27, 2019 08:31 — forked from jsomers/android-websters.md
Instructions for using Webster's 1913 on Android

To use Webster's 1913 dictionary on Android, install Colordict 3, an app that accepts this StarDict format. https://play.google.com/store/apps/details?id=com.socialnmobile.colordict

Next download James's S3 archive. https://s3.amazonaws.com/jsomers/dictionary.zip

You will need to extract the .dict file from inside three containers - .dz, .tar, .bz2 from innermost to outermost. 7zip handles all of these formats.

Place the .dict, .idx and .ifo files in the dictdata directory on your sdcard or local storage root. This is where colordict looks for dictionaries.

When the files are in the right place, you can run Colordict and tap the folder icon in the top right to see the dictionaries installed and set the dictionary priority. I put the 1913 dictionary above the defaults "Wordnet" and "Wikipedia." When you look up a word, ColorDict shows the definition, if available, from these multiple sources.

@dezren39
dezren39 / hb_all_books_dl.js
Created May 4, 2019 07:28 — forked from graymouser/hb_all_books_dl.js
Humble bundle book bundles - download all books at once
/*
After purchasing a humble book bundle, go to your download page for that bundle.
Open a console window for the page and paste in the below javascript
*/
$('a').each(function(i){
if ($.trim($(this).text()) == 'MOBI') {
$('body').append('<iframe id="dl_iframe_'+i+'" style="display:none;">');
document.getElementById('dl_iframe_'+i).src = $(this).data('web');
}
});
@dezren39
dezren39 / hb_all_books_dl.js
Created May 4, 2019 07:28 — forked from fsteffek/hb_all_books_dl.js
Humble bundle book bundles - download all books and md5sums
/*
After purchasing a humble book bundle, go to your download page for that bundle.
Open a console window for the page and paste in the below javascript
*/
function getTitle() {
var re = /^Humble\ Book\ Bundle\:\ (.*)\ \(/g;
return re.exec(document.title)[1];
}
@dezren39
dezren39 / Dockerfile
Created September 5, 2019 06:56 — forked from armand1m/Dockerfile
Yarn cache compatible Dockerfile
FROM alpine
RUN apk add --update --no-cache nodejs
RUN npm i -g yarn
ADD package.json yarn.lock /tmp/
ADD .yarn-cache.tgz /
RUN cd /tmp && yarn
RUN mkdir -p /service && cd /service && ln -s /tmp/node_modules
@dezren39
dezren39 / unfollow.js
Created January 3, 2020 13:18 — forked from JamieMason/unfollow.js.md
Unfollow everyone on twitter.com
// Unfollow everyone on twitter.com, by Jamie Mason (https://twitter.com/fold_left)
// https://gist.github.com/JamieMason/7580315
//
// 1. Go to https://twitter.com/YOUR_USER_NAME/following
// 2. Open the Developer Console. (COMMAND+ALT+I on Mac)
// 3. Paste this into the Developer Console and run it
(() => {
const followButtonQuery = '[data-testid$="-unfollow"]';
const confirmButtonQuery = '[data-testid="confirmationSheetConfirm"]';
const sleep = ({ seconds }) =>
@dezren39
dezren39 / update-ebs-tags.ps1
Last active April 4, 2020 02:55
Sync EC2 EBS Tags with their EC2 Instances.
# Sync EBS tags with their instances.
# Script for non-CloudFormation managed tag cleanup.
# Credit: https://www.yobyot.com/aws/tag-aws-ec2-ebs-volumes-with-the-instance-name-tag/2017/02/05/
# Uses legacy AWSPowerShell monolith module.
# Assumes appropriate Exec Policy, Allow Gallery, etc...
# Install-Module AWSPowershell
Import-Module AWSPowerShell # Must import the module if you haven't already.
@dezren39
dezren39 / rsync-parallel-update.example.sh
Last active April 5, 2020 11:19
rsync parallel update
ls -d /source/*/ | sed 's/\/*$//g' | xargs -n1 -P4 -I% rsync -Pumah --safe-links --stats --dry-run "%" /dest/ | tee -a result.file
ls -d /source/*/ |
sed 's/\/*$//g' |
xargs -n1 -P4 -I% \
rsync -Pumah --safe-links --stats --dry-run "%" /dest/ |
tee result.file
rsync -Pumah --safe-links --stats /source/* /target/
rsync -Pumah --safe-links --stats /source/folder /target/
@dezren39
dezren39 / enable-detailed-monitoring-on-all-ec2.sh
Created May 12, 2020 05:21
Enable Detailed Monitoring for all EC2 Instances with PowerShell one-liner
aws ec2 monitor-instances --instance-ids (aws ec2 describe-instances | ConvertFrom-Json).Reservations.Instances.InstanceId