Skip to content

Instantly share code, notes, and snippets.

View ScottJWalter's full-sized avatar
🔮
Particle. Wave. It's all data.

Scott Walter ScottJWalter

🔮
Particle. Wave. It's all data.
View GitHub Profile
@ScottJWalter
ScottJWalter / Obsidian Git-Mobile.md
Last active January 22, 2024 11:14 — forked from yuvve/Obsidian Git-Mobile.md
Automatically sync notes to and from git repository whenever you open and close Obsidian on mobile. #obsidian #github

How to automatically sync Obsidian between Github and Android with Termux and Tasker

I use Obsidian git on PC, and this workaround (since the plugin doesn't support mobile) to seamlessly* sync my notes to and from my phone. Using these instructions you create an automation for pulling every time you open Obsidian, and pushing every time you close it.

* you can still get merge conflicts...

Downsides of using this

Merge conflicts are not handled and will prevent pushing and pulling. Basically just make sure you only work on your repository from one device at a time.

Preparation

  1. Install Tasker.
  2. Install Termux.
@ScottJWalter
ScottJWalter / Setup.md
Last active January 22, 2024 11:15 — forked from txoof/Setup.md
Setup Termux on Android #termux #android

Termux & Macrodroid Setup on Android

Setup termux for ssh, scripts, tasker/macrodroid integration

Install:

Note If secure Google accounts are active on the device, it is not possible to install apps from Fdroid Store

  • Install The following from the Fdroid Store:
    • Termux
    • Termux:API
  • Termux:Widget
@ScottJWalter
ScottJWalter / import-github-stars-to-raindrop.sh
Last active January 22, 2024 11:16 — forked from davenicoll/import-github-stars-to-raindrop.sh
Import github stars into raindrop.io #github #raindrop
#!/bin/bash
GITHUB_USER="..."
GITHUB_TMP_FILE="$HOME/github-stars.json"
RAINDROP_API_TOKEN="..."
GITHUB_TOKEN="..."
GITHUB_API_HEADER_ACCEPT="Accept: application/vnd.github.star+json" # "Accept: application/vnd.github.v3+json"
GITHUB_API_VERSION="X-GitHub-Api-Version: 2022-11-28"
sanitize_string() {
@ScottJWalter
ScottJWalter / output.js
Last active January 22, 2024 11:16 — forked from derhuerst/output.js
how fetch a GitHub user's stars #github #api
[
{
owner: 'bcoe',
repo: 'top-npm-users',
description: ':star: Generate a list of top npm users by based on monthly downloads.',
language: 'JavaScript',
isFork: false,
stargazers: 27,
watchers: 27
}
@ScottJWalter
ScottJWalter / gist:b5fdd923f77f7e300c9c6a415a6b3f80
Last active January 22, 2024 11:17 — forked from kettle11/gist:33413b02b028b7ddd35c63c0894caedc
Chat GPT World Builder Prompt #gpt #prompt
You are Whimsy, a world-building creation assistant. You are going to help me detail and describe an imaginary world.
Carefully adhere to the following steps for our conversation. Do not skip any steps!:
Main steps:
1. Introduce yourself. Ask what sort of world I'd like to build, offer some ideas including fantasy, scifi, and cyberpunk. Present the ideas as a numbered list with emojis. Also offer at least 2 other world types. Wait for my response.
2. Choose a name for the world. Present alternatives names as a numbered list with emojis or let me propose my own option. Wait for my respinse.
3. Choose a secondary theme for the world or let me propose my own options. Present alternative themes with a numbered list with emojis. Wait for my response.
4. Briefly describe the world and ask if I'd like to make changes. Tell me what the year within the world is. Do not set the year to the real world current year. Wait for my response.
@ScottJWalter
ScottJWalter / colorConversions.js
Last active January 22, 2024 11:18 — forked from avisek/colorConversions.js
RGB, HSL, XYZ, LAB, LCH color conversion algorithms in JavaScript #algorithm #javascript
export function rgbToHsl(rgb) {
const r = rgb.r / 255
const g = rgb.g / 255
const b = rgb.b / 255
const max = Math.max(r, g, b), min = Math.min(r, g, b)
let h, s, l = (max + min) / 2
if (max == min) {
h = s = 0 // achromatic
@ScottJWalter
ScottJWalter / renew-gpgkey.md
Created April 14, 2021 15:30 — forked from krisleech/renew-gpgkey.md
Renew Expired GPG key

Renew GPG key

Given that your key has expired.

$ gpg --list-keys
$ gpg --edit-key KEYID

Use the expire command to set a new expire date:

@ScottJWalter
ScottJWalter / top20list
Last active January 22, 2024 10:55 — forked from Yankim/top20list
Get top 20 recipes from allrecipes.com
br = webdriver.Firefox() #open firefox
br.get('https://www.allrecipes.com/recipes/'+str(yearurls[i]))
###ID number for year, example 1997 has ID of 14486
html_list = br.find_element_by_id("grid")
urls = html_list.find_elements(By.CLASS_NAME, "favorite")
#All top 20 recipes have hearts associated with them. Inside
#the heart contains the unique ID number for the given recipe
for i, e in enumerate(urls):
@ScottJWalter
ScottJWalter / git-hard-delete
Created February 17, 2021 21:27 — forked from srebalaji/git-hard-delete
Examples of git custom command
#!/bin/sh
branch=$1
if [ ! -z "$1" ]
then
git branch -D $branch
git push -d origin $branch
else
echo "Branch name is not specified"
@ScottJWalter
ScottJWalter / README.md
Created June 2, 2020 08:48 — forked from CodingDoug/README.md
Aggregating Twitter search results and displaying them on a web page in realtime

Aggregating Twitter search results and displaying them on a web page in realtime

If you're trying to do this, you came to the right place!

See this code in action here: https://twitter.com/CodingDoug/status/948225623939473413

Setup

These instructions assume that you already have a Firebase project, and you've provisioned Firestore in it.