Skip to content

Instantly share code, notes, and snippets.

@roachhd
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 => {
resp(loc)
})
})
}
@roachhd
roachhd / notes.md
Last active April 4, 2022 10:46
Photography notes
View notes.md

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

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

@roachhd
roachhd / DNS.md
Created August 25, 2018 02:36
GoDaddy GitHub pages DNS
View DNS.md

Setup Godaddy Domain for GitHub Page

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

see also GitHub Pages + GoDaddy

@roachhd
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')
}
dSS.link.rel = "stylesheet";
dSS.link.type = "text/css";
dSS.link.href = dSS.names[ dSS.number ] + ".css";
View minecraft-banners.html
<iframe src="https://minecraft-statistic.net/en/userbars/html/server/banner_40901_c4cdcf_eda1dc_7d7878_5cd6c0_e6d167_787373_663f3f_1_1_1.html" frameborder="0" scrolling="no" width="336" height="566"></iframe>
''''
<iframe src="https://minecraft-statistic.net/en/userbars/html/server/banner_40901_c4cdcf_eda1dc_7d7878_5cd6c0_e6d167_787373_663f3f_1_1_1.html" frameborder="0" scrolling="no" width="336" height="566"></iframe>
''''
@roachhd
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
Chars = "BCDFGHJKMPQRTVWXY2346789"
Do
Cur = 0
x = 14
@roachhd
roachhd / random.md
Created March 21, 2015 14:10
command blocks
View random.md

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

@roachhd
roachhd / README.md
Created January 18, 2015 01:35
how to set exercise goals
View README.md

How to Set Exercise Goals ‹ Hello Healthy

[Mindfulness][1] / January 5, 2015

How to Set Exercise Goals

![][2]

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
roachhd / README.md
Created January 17, 2015 11:03
meal planning 🍴
View README.md

A Beginner’s Guide to Meal Planning ‹ Hello Healthy

A Beginner's Guide to Meal Planning

![][1]

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!