Skip to content

Instantly share code, notes, and snippets.

Avatar

William Jacoby bonelifer

View GitHub Profile
View add_local_trusted_ca_for_valid_https.md

Generating SSL keys for development

Installation

Thanks to minica it is very easy to create trusted SSL certificates that have a very long expiration date.

In order to get started you have to have the go tools installed and set up correctly in your environment.

Setup

@bonelifer
bonelifer / feels_like.py
Created Sep 20, 2020 — forked from jfcarr/feels_like.py
"Feels Like" (temperature) Calculation in Python
View feels_like.py
# I use a Python script to pull current weather conditions from the NOAA web service API. The NOAA web
# service does not return a windchill value for all locations, but given temperature, relative humidity,
# and wind speed you can calculate a “feels like” temperature as follows.
# This code assumes units of Fahrenheit, MPH, and Relative Humidity by percentage. In this example, a
# temperature of 35F, wind speed of 10mph, and relative humidity of 72% yields a "feels like" value of 27.4F
import math
vTemperature = float(35)
@bonelifer
bonelifer / fc.php
Last active Sep 20, 2020
Get weather for today
View fc.php
<?php
require_once 'noaa/Forecaster.php';
$config = new \noaa\weather\Configuration();
$myWritableCacheDirectory = dirname(__FILE__) . '/cache';
$config->setCache(new \noaa\weather\cache\FileCache($myWritableCacheDirectory));
$forecaster = new \noaa\Forecaster($config);
// Function to calculate HeatIndex
function heatIndex($currTempF,$currentHumidity){
## Function Found at https://github.com/RunnenLate/HeatIndexCalculator/blob/master/HeatIndexCalculator/src/HeatIndexCalculator.java#L38
@bonelifer
bonelifer / userChrome.css
Created Sep 4, 2020 — forked from Jakob-PB/userChrome.css
My custom userChrome.css file I use for tweaking Firefox's behaviour
View userChrome.css
/*** BEGIN - Override URL bar enlargement ***/
/* Compute new position, width, and padding */
#urlbar[breakout][breakout-extend] {
top: 5px !important;
left: 0px !important;
width: 100% !important;
padding: 0px !important;
}
@bonelifer
bonelifer / github_backup_gists.sh
Created Sep 4, 2020 — forked from mbohun/github_backup_gists.sh
simple and easy github gist backup
View github_backup_gists.sh
#!/usr/bin/env bash
for url in `./githubapi-get.sh $GIST_TOKEN /gists | jq -r '.[]|.git_pull_url'`
do
git clone ${url};
done
@bonelifer
bonelifer / releases.sh
Created Sep 4, 2020 — forked from haisum/releases.sh
Create and upload github releases
View releases.sh
go get github.com/aktau/github-release
echo "export GITHUB_TOKEN=$1" >> ~/.bash_profile;
git tag v0.0
git push --tags
github-release.exe -v release --repo focusedu --user haisum -t v0.0 -d "Static file server"
github-release.exe -v upload --repo focusedu --user haisum -t v0.0 -n focusedu.exe -f focusedu.exe
@bonelifer
bonelifer / latest-release.sh
Created Sep 4, 2020 — forked from moqmar/latest-release.sh
Get the latest release download from GitHub
View latest-release.sh
repo=sharkdb/fd
file=0 # use the first file
# with jq (recommended if available)
wget https://api.github.com/repos/${repo}/releases/latest -qO- | jq -r ".assets[${file}].browser_download_url"
# - or -
curl https://api.github.com/repos/${repo}/releases/latest -so- | jq -r ".assets[${file}].browser_download_url"
file=$(($file + 1)) # WARNING: sed uses 1-based indices!
@bonelifer
bonelifer / github-repos.sh
Created Sep 4, 2020 — forked from vinayr/github-repos.sh
List all your github repos
View github-repos.sh
curl https://api.github.com/user/repos?page=1&per_page=100&access_token=YOUR_ACCESS_TOKEN | jq '.[] | select(.permissions.admin == true) | .html_url'
View better-gh-issue-labels
#!/bin/bash
echo -n "Github Username: "
read USER
echo -n "Password: "
read PASS
echo -n "Repo (e.g. cyclejs/core); "
read REPO
@bonelifer
bonelifer / dump_github_issues.sh
Created Sep 4, 2020 — forked from oelna/dump_github_issues.sh
Export Github issues from the command line
View dump_github_issues.sh
#!/bin/bash
echo "Please enter your Github username"
read username
echo "Please enter your Github password"
read -s password
echo "What is the Github repo you'd like to download issues from?"
echo "Format is user/repo"
You can’t perform that action at this time.