Skip to content

Instantly share code, notes, and snippets.

Avatar
🤗
free hugs

todgru

🤗
free hugs
View GitHub Profile
@todgru
todgru / github-pages-namecheap-dns.md
Last active Sep 13, 2020
Setup Namecheap dns for github pages
View github-pages-namecheap-dns.md

At Namecheap, in the domains advanced dns settings, add A records and CNAME record. The CNAME will allow the www.example.com to be redirected to the apex domain, example.com.

  • A record, host: @ value: 185.199.108.153
  • A record, host: @ value: 185.199.109.153
  • A record, host: @ value: 185.199.110.153
  • A record, host: @ value: 185.199.111.153
  • CNAME record, host: www value: example-username.github.io

At Github, repo settings, set custom domain to example.com, check "Enforce HTTPS".

@todgru
todgru / chirp-20200902-oregon-idaho.csv
Last active Sep 2, 2020
20200902 chirp select repeaters for idaho and oregon. Should print this for reference. Name follows the format “RoadTown”. A “x” preface means its a YSF/C4FM/Wires repeater. Towns with many repeaters have extra letters after the road and before the town to help differentiate repeaters. Example “I84bPendleton”. And extra “u”’s indicates a UHF rep…
View chirp-20200902-oregon-idaho.csv
Location Name Frequency Duplex Offset Tone rToneFreq cToneFreq DtcsCode DtcsPolarity Mode TStep Comment
1 146.46 146.46000 0.00000 82.5 88.5 023 NN FM 0 overland
2 146.52 146.52000 0.00000 82.5 88.5 023 NN FM 0 nat calling
3 ID21PILOTPEAK 145.31000 - 0.60000 Tone 100.0 100.0 023 NN FM 5 145.3100 - 0.6 PL 100 VHF KA7ERV
4 ID75GALENA 147.14000 + 0.60000 Tone 100.0 100.0 023 NN FM 5 147.1400 + 0.6 PL 100 VHF AE6DX/R :Coverage from Twin Falls to Cape Horn above Stanley
5 ID75KETCHUM 147.18000 + 0.60000 Tone 100.0 100.0 023 NN FM 5 147.1800 + 0.6 PL 100 VHF N7ACB/R :Coverage from Twin Falls to Cape Horn above Stanley
6 ID55CASCADE 146.62000 - 0.60000 Tone 100.0 100.0 023 NN FM 5 146.6200 - 0.6 PL 100 VHF W7VOI :Net Thur@8pm
7 ID55MCCALL 147.02000 + 0.60000 Tone 100.0 100.0 023 NN FM 5 McCall, No Business Montain
8 XID55MCCALL 146.90000 - 0.60000 Tone 123.0 88.5 023 NN FM 5 146.9000 - 0.6 PL 123.0 Fusion AMS KC7MCC
9 ID55UMCCALL 442.50000 + 5.00000 Tone 100.0 100.0 023 NN FM 5 442.5000 + 5.0 UHF KC7MCC
@todgru
todgru / pi-star-notes.md
Last active Jun 10, 2020
Pi-star Notes: FCS YSF Wire-x room numbering C4FM reflectors
View pi-star-notes.md

Pi-Star Notes

General information about rooms

Networks and "rooms"

There are basically three different networks. YSF, FCS, and the Wires-X Network. The Wires-X network is Yaesu's own network and you need their hardware to access it (or a local repeater that's connected to it). YSF and FCS are open.

@todgru
todgru / get.js
Created May 21, 2020
vanilla javascript version of lodash get
View get.js
/**
* The behaves the same as the lodash version https://www.npmjs.com/package/lodash.get
*
* Source: https://github.com/you-dont-need/You-Dont-Need-Lodash-Underscore#_get
*/
const get = (obj, path, defaultValue = undefined) => {
const travel = regexp =>
String.prototype.split
.call(path, regexp)
.filter(Boolean)
@todgru
todgru / principles.md
Last active May 15, 2020
software guideline principles for a lazy programmer
View principles.md

Principles for lazy programmers

ongoing list that is sure to change.

setting: you can't show someone the light if they don't open their eyes. know when to shutup.

  1. single responsibility
  2. well written code should make tests easy to write
  3. explicit is better than implicit, except when its not
  4. YAGNI (You Aren't Gonna Need It)
@todgru
todgru / post-receive
Created Apr 28, 2020 — forked from tlrobinson/post-receive
Super simple git post-receive hook for Node.js + nvm + npm + node-foreman + init (Ubuntu) deployment
View post-receive
#!/usr/bin/env bash
set -u
set -e
export GIT_WORK_TREE="/var/www/example.com"
export NODE_VERSION="0.10"
echo "--> Checking out..."
git checkout -f
@todgru
todgru / git-deployment.md
Last active Apr 28, 2020 — forked from noelboss/git-deployment.md
Simple automated GIT Deployment using Hooks. Example to copy dist distribution directory.
View git-deployment.md

Simple automated GIT Deployment using GIT Hooks

Here are the simple steps needed to create a deployment from your local GIT repository to a server based on this in-depth tutorial.

How it works

You are developing in a working-copy on your local machine, lets say on the master branch. Most of the time, people would push code to a remote server like github.com or gitlab.com and pull or export it to a production server. Or you use a service like deepl.io to act upon a Web-Hook that's triggered that service.

@todgru
todgru / maupin-chirp.csv
Last active May 26, 2020
maupin area chirp repeaters, uppercase names for because the Yaesu FT70-DR will not display lower case
View maupin-chirp.csv
Location Name Frequency Duplex Offset Tone rToneFreq cToneFreq DtcsCode DtcsPolarity Mode TStep Comment
1 146.52 146.52000 0.00000 Tone 82.5 88.5 023 NN FM 0 nat calling
2 146.46 146.46000 0.60000 Tone 82.5 88.5 023 NN FM 0 overland
3 TIMBERLINE 147.12000 + 0.60000 Tone 100.0 100.0 023 NN FM 5 Timberline
4 DUFER/TYGH RIDGE 147.26000 + 0.60000 Tone 82.5 88.5 023 NN FM 5 Dufur, Tygh Ridge
5 DALLESTHE 146.74000 - 0.60000 Tone 100.0 88.5 023 NN FM 5 The Dalles
6 HOOD RIVER 145.15000 - 0.60000 Tone 94.8 88.5 023 NN FM 5 Hood River, Mount Defiance
7 HOOD RIVER 147.10000 + 0.60000 Tone 100.0 100.0 023 NN FM 5 Hood River, Mount Defiance
8 FOSSIL 146.68000 - 0.60000 Tone 162.2 88.5 023 NN FM 5 Fossil, Snowboard Ridge
9 REDMOND 145.13000 - 0.60000 DTCS 88.5 88.5 026 NN FM 5 Redmond, Cline Butte
@todgru
todgru / raw-nest-true.md
Created Apr 21, 2020
sequelize nest raw
View raw-nest-true.md

Returns an undecorated sequelize instance. this should work for many model methods.

const result = await model.findByPk(1, { raw: true, nest: true }
@todgru
todgru / size.sql
Created Apr 21, 2020
display size of postgres database and table
View size.sql
SELECT pg_size_pretty (
pg_total_relation_size ('"camelCaseTableName"')
);
SELECT pg_size_pretty (
pg_database_size ('lowercaseddbname')
);
You can’t perform that action at this time.