Skip to content

Instantly share code, notes, and snippets.

roachhd / What’s my Elevation
Created December 28, 2021 16:19
Script to check elevation about sea level
View What’s my Elevation
const debug = false;
let stop = false;
function getLocation() {
return new Promise((resp, reje) => {
Location.current().then(loc => {
roachhd /
Last active April 4, 2022 10:46
Photography notes

Large aperture = Small f-number = Shallow (small) depth of field

Small aperture = Larger f-number = Deeper (larger) depth of field

roachhd /
Created August 25, 2018 02:36
GoDaddy GitHub pages DNS

Setup Godaddy Domain for GitHub Page

  1. Create a new file CNAME and put the in the file.
  2. Login GoDaddy > Manage domain > DNS Zone File.
  3. Under A (Host) change @ point to
  4. Under CName (Alias) change www point to

see also GitHub Pages + GoDaddy

roachhd / Alternative.script
Last active January 11, 2020 09:09
script to set a different CSS sheet for each day of the week
View Alternative.script
var dSS = {
names: ["Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"],
number: new Date().getDay(),
link: document.createElement('link')
} = "stylesheet"; = "text/css"; = dSS.names[ dSS.number ] + ".css";
View minecraft-banners.html
<iframe src="" frameborder="0" scrolling="no" width="336" height="566"></iframe>
<iframe src="" frameborder="0" scrolling="no" width="336" height="566"></iframe>
roachhd / productkey.vbs
Created August 7, 2015 14:40
Find your product key for Windows OS
View productkey.vbs
Set WshShell = CreateObject("WScript.Shell")
MsgBox ConvertToKey(WshShell.RegRead("HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\DigitalProductId"))
Function ConvertToKey(Key)
Const KeyOffset = 52
i = 28
Cur = 0
x = 14
roachhd /
Created March 21, 2015 14:10
command blocks

/summon ArmorStand ~ ~ ~ {NoBasePlate:1b,NoGravity:1b,ShowArms:1b,DisabledSlots:2031616,Pose:{Body:[0f,4f,0f],RightArm:[0f,0f,105f]}}

roachhd /
Created January 18, 2015 01:35
how to set exercise goals

How to Set Exercise Goals ‹ Hello Healthy

[Mindfulness][1] / January 5, 2015

How to Set Exercise Goals


Mount Everest. The Badwater Ultra-Marathon. What do the these things have in common? They are Big, Hairy, Audacious Goals (BHAG) that are achieved by putting one foot in front of the other. And they are rarely achieved. The only person who's both climbed Everest and run Badawater is Marshall Ulrich. In his autobiography Running on Empty, Ulrich's recommendation for achieving BHAGs is to "focus on the present and set intermediate goals." And the best Sport Psychology research points to the same thing. Setting intermediate, or "process goals" are vastly superior to BHAGs.

roachhd /
Created January 17, 2015 11:03
meal planning 🍴

A Beginner’s Guide to Meal Planning ‹ Hello Healthy

A Beginner's Guide to Meal Planning


When it comes to eating well, meal planning is one of the easiest things you can do to set yourself up for success. The beauty of it is there are no rules and, you can't really mess it up. The key is just to start, and to set aside a little bit of time each week to do it. There are so many ways to approach meal planning that, after practicing just once or twice, you'll begin to find what works for you and your family too.

To help you get started, we've broken down some of the basics. We've even included two practice exercises to help you map out your next week's worth of healthy meals!