Skip to content

Instantly share code, notes, and snippets.

View robatron's full-sized avatar
🤖

Rob McGuire robatron

🤖
  • Zillow
  • Seattle, WA
View GitHub Profile
let timeBox = document.getElementsByClassName('c-timestamp');
let i = 0;
while(i < timeBox.length) {
    var date = new Date( timeBox[i].getAttribute('data-ts') * 1000);
    var dateFormate = date.getFullYear() + '-' + (date.getMonth()+1) + '-' + date.getDate();
    dateFormate = dateFormate + '-' + date.getHours() + ':' + date.getMinutes() + ':' + date.getSeconds();   
    var currentText = timeBox[i].getElementsByClassName('c-timestamp__label')[0].innerHTML;
    if (! currentText.includes(dateFormate)){
 timeBox[i].getElementsByClassName('c-timestamp__label')[0].innerHTML = currentText + ' (' + dateFormate + ')';
@robatron
robatron / making-a-timelapse.md
Last active December 17, 2023 10:40
Making a Timelapse Video with a GoPro and a MacBook

Making a Timelapse Video with a GoPro and a MacBook

Here are some details about how I made this timelapse video with a GoPro and a Mac. It wasn't as straight-forward as I thought it would be, so I wanted to share what I learned.

As you can see from the video, the subject was me building a wooden mechanical 3D puzzle which took me nearly 18 hours to build. I took a photo once every 5 seconds which yeilded more than 12.7k photos.

Ingredients

Here's what I used to make a timelapse video.

@ruanbekker
ruanbekker / tree_style_tab_firefox.md
Created November 28, 2019 06:18
Hide Native Tabs with Tree Style Tabs for Firefox
@qoomon
qoomon / conventional_commit_messages.md
Last active May 10, 2024 04:09
Conventional Commit Messages

Conventional Commit Messages

See how a minor change to your commit message style can make a difference.

Tip

Have a look at git-conventional-commits , a CLI util to ensure these conventions and generate verion and changelogs

Commit Message Formats

Default

@vegasbrianc
vegasbrianc / datasource.yml
Last active April 23, 2020 19:44
Grafana provisioning of Prometheus datasource
# config file version
apiVersion: 1
# list of datasources that should be deleted from the database
deleteDatasources:
- name: Prometheus
orgId: 1
# list of datasources to insert/update depending
# whats available in the database
If you want to achieve greatness stop asking for permission. ~Anonymous
Things work out best for those who make the best of how things work out. ~John Wooden
To live a creative life, we must lose our fear of being wrong. ~Anonymous
If you are not willing to risk the usual you will have to settle for the ordinary. ~Jim Rohn
Trust because you are willing to accept the risk, not because it's safe or certain. ~Anonymous
Take up one idea. Make that one idea your life - think of it, dream of it, live on that idea. Let the brain, muscles, nerves, every part of your body, be full of that idea, and just leave every other idea alone. This is the way to success. ~Swami Vivekananda
All our dreams can come true if we have the courage to pursue them. ~Walt Disney
Good things come to people who wait, but better things come to those who go out and get them. ~Anonymous
If you do what you always did, you will get what you always got. ~Anonymous
Success is walking from failure to failure with no loss of enthusiasm. ~Winston Chu
@kyledrake
kyledrake / ferengi-plan.txt
Last active April 6, 2024 00:30
How to throttle the FCC to dial up modem speeds on your website using Nginx
# The blog post that started it all: https://neocities.org/blog/the-fcc-is-now-rate-limited
#
# Current known FCC address ranges:
# https://news.ycombinator.com/item?id=7716915
#
# Confirm/locate FCC IP ranges with this: http://whois.arin.net/rest/net/NET-165-135-0-0-1/pft
#
# In your nginx.conf:
location / {
@blueyed
blueyed / awesome-rename-tag.rc.lua
Last active November 6, 2019 13:46
awesomeWM: rename the current tag
-- Rename tag
awful.key({ modkey, "Shift", }, "F2", function ()
awful.prompt.run({ prompt = "Rename tab: ", text = awful.tag.selected().name, },
mypromptbox[mouse.screen].widget,
function (s)
awful.tag.selected().name = s
end)
end),
@branneman
branneman / better-nodejs-require-paths.md
Last active April 27, 2024 04:16
Better local require() paths for Node.js

Better local require() paths for Node.js

Problem

When the directory structure of your Node.js application (not library!) has some depth, you end up with a lot of annoying relative paths in your require calls like:

const Article = require('../../../../app/models/article');

Those suck for maintenance and they're ugly.

Possible solutions

@jwebcat
jwebcat / color-var.sh
Created March 11, 2013 06:47
bash ansi color variables
RED='\033[00;31m'
GREEN='\033[00;32m'
YELLOW='\033[00;33m'
BLUE='\033[00;34m'
PURPLE='\033[00;35m'
CYAN='\033[00;36m'
LIGHTGRAY='\033[00;37m'
LRED='\033[01;31m'
LGREEN='\033[01;32m'