Skip to content

Instantly share code, notes, and snippets.

View contolini's full-sized avatar
🐛
call me

Chris Contolini contolini

🐛
call me
View GitHub Profile
@contolini
contolini / mobile-phone-tracking-website.md
Last active April 29, 2024 14:02
How to create a simple real-time location tracking website a la https://whereis.contolini.com

The steps below require a smartphone running Android. If you're an iPhone user you'll have to find an appropriate iOS app for step #4. Maybe this?

  1. Copy this HTML file to wherever you want your page to live.
  2. Create an account at MapBox and generate an API token on your account page.
  3. Replace my API token with yours in the HTML file.
  4. Install GPS Logger for Android on your phone.
  5. Create an account at ThingSpeak and get an API key. We'll use ThingSpeak to store your GPS coordinates.
  6. Create a new ThingSpeak channel. Enable all eight fields and make the channel public. It should look like this.
  7. R
@contolini
contolini / limits.md
Last active January 29, 2024 17:17
IRS Retirement Plan Contribution Limits

2024 Contribution limits

  • IRA limit is $7,000
  • HSA limit is $8,300 for family coverage ($4,150 for self-only coverage)
  • Maximum employee elective deferral is $23,000 ($30,500 if you're 50 by the end of the year)
  • Defined contribution maximum limit, all sources is $69,000

See this table for the complete list of changes.

2023 Contribution limits

@contolini
contolini / funds.md
Last active January 29, 2024 17:14
Federal Reserve Thrift Plan Funds (as of July 2018)
format = """
[▓▒░](fg:#a3aed2 bg:#769ff0)\
$directory\
[](fg:#769ff0 bg:#394260)\
$git_branch\
$git_status\
[](fg:#394260 bg:#212736)\
$nodejs\
$rust\
$golang\
@contolini
contolini / aliases.zsh
Last active October 19, 2023 16:30
ohmyzsh aliases
alias dl="cd ~/Downloads"
alias dt="cd ~/Desktop"
alias p="cd ~/Projects"
alias g="git"
alias h="history"
alias v="vim"
alias o="open"
alias oo="open ."
# Delete stuff
const startLoading = () => {
document.body.style.opacity = .5;
}
const stopLoading = () => {
document.body.style.opacity = 1;
}
const createResultItem = data => {
const div = document.createElement( 'div' );
@contolini
contolini / beginners-guide.md
Last active August 2, 2021 21:01
Beginner's guide to IoT (Internet of Things) and the ESP8266

Beginner's guide to building IoT devices

The gist

Ever heard of an Arduino? It's a $35 microcontroller that lets you write code that interacts with motors and lights and IRL stuff. Well, there's a $2 version that has all the same features and is the size of a postage stamp. It's call the ESP8266.

The ESP8266

ESP8266 is an inexpensive wifi-enabled SoC made by the company Espressif. It was released in 2014 with very little documentation but its low cost motivated hardware hackers around the world to explore and document the module. Online communities formed to discuss the chip and how to build with it.

@contolini
contolini / getCache.js
Last active January 17, 2020 14:58 — forked from ryanflorence/getCache.js
Memoization of jQuery's $.getJSON() to use localStorage for caching.
var getCache = function(url) {
var supportsLocalStorage = 'localStorage' in window;
// Both functions return a promise, so no matter which function
// gets called inside getCache, you get the same API.
function getJSON(url) {
var promise = $.getJSON(url);
<div class="o-info-unit-group">
<h2>Some title</h2>
<div class="content-l">
<div class="content-l_col content-l_col-1-2">
<div class="m-info-unit">
<div class="m-info-unit_image m-info-unit_image__square" style="background-image: url( 'https://via.placeholder.com/150' );">
</div>
<div class="m-info-unit_content">
<h3>A title</h3>
<div>
<div class="o-info-unit-group">
<h2>Some great things</h2>
<div class="content-l">
<div class="content-l_col content-l_col-1">
<div class="m-info-unit m-info-unit__inline">
<div class="m-info-unit_image m-info-unit_image__square" style="background-image: url( 'https://via.placeholder.com/150' );">
</div>
<div class="m-info-unit_content">
<h3>Here's a great thing</h3>
<div class="rich-text">