Skip to content

Instantly share code, notes, and snippets.

View EricTendian's full-sized avatar
🕵️‍♂️
Stay curious.

Eric Tendian EricTendian

🕵️‍♂️
Stay curious.
View GitHub Profile
@EricTendian
EricTendian / cpdZ4.html
Created February 5, 2023 19:01
Created March 17 2014
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Chicago Police Zone 4 - Dist 1 and 18 Live Audio Feed</title>
<script src="mediaelement/jquery.js"></script>
<script src="mediaelement/mediaelement-and-player.min.js"></script>
<link rel="stylesheet" href="mediaelement/mediaelementplayer.min.css" />
<link rel="stylesheet" href="//netdna.bootstrapcdn.com/bootstrap/3.1.1/css/bootstrap.min.css" />
@EricTendian
EricTendian / nuclear-waste-block-comment.txt
Created May 16, 2020 05:35
Use when needed to warn about nuclear waste-like code. From "Expert Judgment on Markers to Deter Inadvertent Human Intrusion into the Waste Isolation Pilot Plant", Sandia National Laboratories report SAND92-1382 / UC-721, p. F-49
/**
* This place is a message...and part of a
* system of messages...pay attention to it!
*
* Sending this message was important to us.
* We considered ourselves to be a powerful culture.
*
* This place is not a place of honor...no
* highly esteemed deed is commemorated here
* ...nothing valued is here.
@EricTendian
EricTendian / email-over-curl.sh
Created February 17, 2020 22:11
Sending an HTML email with curl over SMTP
#!/bin/bash
cat << EOF > email.eml
From: "${MAIL_FROM_NAME}" <${MAIL_FROM_ADDRESS}>
To: "${MAIL_TO_NAME}" <${MAIL_TO_ADDRESS}>
Reply-To: "${MAIL_TO_NAME}" <${MAIL_TO_ADDRESS}>
Subject: ${MAIL_SUBJECT}
Content-Type: text/html; charset="utf-8"
Content-Transfer-Encoding: quoted-printable
@EricTendian
EricTendian / Instructions.md
Last active November 26, 2018 18:33 — forked from pgilad/Instructions.md
Git commit-msg hook to validate for jira issue or the word merge

Instructions

  • Copy the file commit-msg to .git/hooks/commit-msg
  • Make sure your delete the sample file .git/hooks/commit-msg.sample
  • Make commit msg executable. chmod +x .git/hooks/commit-msg
  • Edit commit-msg to better fit your development branch, commit regex and error message
  • Profit $$

Shell example

@EricTendian
EricTendian / deploy-vagrant-azure.sh
Created May 30, 2017 02:37
How to deploy a Vagrant Linux box in Microsoft Azure with a custom image
# NOTE: This was tested on a Blackboard Learn Vagrant machine in May 2017. Unknown how well the directions apply to other Vagrant machines.
# NOTE 2: Errors WILL occur as this is not well supported on Azure. You may need to do a fair bit of troubleshooting and pay close attention to these instructions.
# Step 1: Download the Vagrant .box file
wget BOX_FILE
# Step 2: Extract the .box file to the current directory (check the file format with the `file` command before you use tar)
tar xf BOX_FILE
# Step 3: Convert the resulting VMDK to a fixed size VHD
VBoxManage clonehd box-disk1.vmdk --format VHD --variant Fixed box-disk1.vhd
# Step 4: Upload the VHD to a storage account of your choice

Keybase proof

I hereby claim:

  • I am EricTendian on github.
  • I am erictendian (https://keybase.io/erictendian) on keybase.
  • I have a public key whose fingerprint is 4A40 E547 DB36 E405 B2D8 A57B 34AC FA62 BE6B 7570

To claim this, I am signing this object:

@EricTendian
EricTendian / remove_eggs.js
Created April 24, 2016 03:56
Simple script to remove egg accounts from your Twitter feed.
// Works as of April 23, 2016 on Twitter.com and TweetDeck.twitter.com, in Google Chrome
/*
To use as a bookmarklet, bookmark this URL:
javascript:(function()%7Bvar%20eggs%20%3D%20document.querySelectorAll('.stream-item%20img%5Bsrc%5E%3D%22https%3A%2F%2Fabs.twimg.com%2Fsticky%2Fdefault_profile_images%2F%22%5D')%3Bfor%20(var%20i%20%3D%200%3B%20i%20%3C%20eggs.length%3B%20i%2B%2B)%20%7Bvar%20egg%20%3D%20eggs%5Bi%5D%3Bwhile%20(!egg.classList.contains(%22stream-item%22))%20%7Begg%20%3D%20egg.parentNode%3B%7Degg.remove()%3B%7D%7D)()
*/
var eggs = document.querySelectorAll('.stream-item img[src^="https://abs.twimg.com/sticky/default_profile_images/"]');
for (var i = 0; i < eggs.length; i++) {
var egg = eggs[i];
while (!egg.classList.contains("stream-item")) {
egg = egg.parentNode;
@EricTendian
EricTendian / import_fb_chat_to_slack.js
Last active August 29, 2015 14:17
Use this little jQuery script to help create a CSV from a Facebook chat. You'll need to copy the ul element with id webMessengerRecentMessages and everything inside it to a new HTML file, and then include jQuery. From there you can open up devtools, paste in this script, and get an output. Then copy that output into a new textfile, save it, chan…
$("li.webMessengerMessageGroup > div.clearfix > div.clearfix._42ef").each(function () {
var line = '"'+Math.round($(this).find("div.rfloat._ohf abbr").attr("data-utime"))+'","general","'+$(this).find("div:nth-child(2) > strong > a").text()+'",';
$(this).find("div:nth-child(2) > div > div._53 > div").each(function () {
var text = $(this).find("div._38.direction_ltr > span > p").text().replace("\n","\\n");
if (text.length) console.log(line + '"'+text+ "\"\n");
});
});
@EricTendian
EricTendian / podcasts.md
Last active February 27, 2020 06:27
Podcasts I listen to (as of 2016)

You'll have to search for these yourselves in the podcast app of your choice. I personally use the app "Stitcher". In no particular order...

Entrepreneurship

  • DFJ Entrepreneurial Thought Leaders
  • StartUp Podcast
  • a16z
  • This Week in Startups

News

@EricTendian
EricTendian / playzone.sh
Last active August 29, 2015 14:09
Use this shell script to play a specific Broadcastify #ChicagoScanner stream on your Linux computer. Currently uses omxplayer for use with a Raspberry Pi.
#!/bin/bash
case $1 in
'Chicago Police Department'|'cpd')
omxplayer http://relay.broadcastify.com:80/il_chicago_police2.mp3
;;
'Chicago Police - Citywide 1'|'cw1')
omxplayer http://relay.broadcastify.com:80/128024765.mp3
;;
'Chicago Police - Citywide 6'|'cw6')