Skip to content

Instantly share code, notes, and snippets.

View reubano's full-sized avatar

Reuben Cummings reubano

View GitHub Profile
@reubano
reubano / get_title_and_url_from_front_browser.applescript
Last active January 30, 2024 03:18 — forked from dongyuwei/get_title_and_url.applescript
Applescript to get frontmost tab’s url and title of various browsers.
# This example will return both the URL and title for the frontmost tab of the active browser, separated by a newline.
# Keep in mind that by using `using terms from`, we’re basically requiring that referenced browser to be available on the system
# (i.e., to use this on "Google Chrome Canary" or "Chromium", "Google Chrome" needs to be installed).
# This is required to be able to use a variable in `tell application`. If it is undesirable, the accompanying example should be used instead.
tell application "System Events" to set frontApp to name of first process whose frontmost is true
set currentTabUrl to ""
set currentTabTitle to ""
if (frontApp is "Safari") or (frontApp is "Webkit") then
@reubano
reubano / alarm_keypad_automations.yaml
Last active July 31, 2023 03:53
Ring Keypad Automations
blueprint:
name: Ring Keypad Automations (Alarm Panel)
description: Automations to use the Ring Keypad with an Alarm Panel integration. See https://github.com/ImSorryButWho/HomeAssistantNotes/blob/main/RingKeypadV2.md for more information.
domain: automation
input:
keypad:
name: Keypad Device
description: The device entry for the Ring keypad
selector:
device:
@reubano
reubano / Pulumi.dev.yaml
Last active July 24, 2023 12:42
Vouch Authentication with Nginx and Caddy
config:
env: Dev
resourceGroup:
name: <name>
tags:
key: value
vouch:
clientID: <ID>
clientSecret:
secure: <secure>
@reubano
reubano / VDI_test.rebex.net.sh
Last active June 7, 2023 17:16
SSH debugging
root@PVD-PIAP-000046:~# ssh -vvv demo@test.rebex.net
OpenSSH_8.9p1 Ubuntu-3ubuntu0.1, OpenSSL 3.0.2 15 Mar 2022
debug1: Reading configuration data /root/.ssh/config
debug1: /root/.ssh/config line 1: Applying options for *
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: /etc/ssh/ssh_config line 19: include /etc/ssh/ssh_config.d/*.conf matched no files
debug1: /etc/ssh/ssh_config line 21: Applying options for *
debug3: expanded UserKnownHostsFile '~/.ssh/known_hosts' -> '/root/.ssh/known_hosts'
debug3: expanded UserKnownHostsFile '~/.ssh/known_hosts2' -> '/root/.ssh/known_hosts2'
debug2: resolving "test.rebex.net" port 22
@reubano
reubano / Digital Project - Development Contract - Agency (or Company) to Freelancer.md Example contract for use by Creative, Digital and Marketing Agencies (or any company for that matter) to use when contracting a Freelance Web Developer on digital projects.

I've shared this contact for use by Creative, Digital and Marketing Agencies (or any company for that matter) to use when contracting a Freelance Web Developer on digital projects. Feel free to fork, amend and use for your own projects however please be nice and credit where credit is due and take a note of the disclaimer on this document.

My aim is to create a realistic, agreeable contract with as little unreadable jargon as possible. Hopefully this example contract achieves that and is useful to you, feel free to comment so I can amend.

PS: feel free to remove this section (of course) when using in your final docs.


 

@reubano
reubano / README.md
Created May 9, 2018 21:50 — forked from twolfson/README.md
Terms of use and privacy policy evaluation
@reubano
reubano / sitemap_checker.py
Last active November 15, 2017 20:37 — forked from ndunn219/sitemap_checker.py
This code shows how to check a sitemap to make sure there are no links pointing to missing pages and to see if 301s are working correctly. It is explained at https://www.webucator.com/blog/2016/05/checking-your-sitemap-for-broken-links-with-python/
import requests
from bs4 import BeautifulSoup
sitemap = 'http://www.nasa.gov/sitemap/sitemap_nasa.html'
r = requests.get(sitemap)
html = r.content
soup = BeautifulSoup(html, 'html.parser')
links = soup.find_all('a')
@reubano
reubano / ghi-setup.md
Last active August 21, 2017 12:56
GHI (github-issues) setup steps
gem install ghi
open https://github.com/settings/tokens 
echo 'generate a personal access token for ghi with repo permissions'
git config --global ghi.token <GHI_TOKEN_WITH_REPO_PERMS>
boto3==1.4.4
s3fs==0.1.1
pydicom==0.9.9

manage

usage: manage [-m CONFIG_MODE] [-f CONFIG_FILE] [-?]
              {runserver,serve,lint,test,shell} ...

positional arguments:
  {runserver,serve,lint,test,shell}
    runserver           Runs the flask development server Overrides the built-
                        in `runserver` behavior