Skip to content

Instantly share code, notes, and snippets.

View thatdoogieguy's full-sized avatar

Jacob Thomas thatdoogieguy

View GitHub Profile
@thatdoogieguy
thatdoogieguy / cloudSettings
Last active January 21, 2023 17:56
vscodesettings
{"lastUpload":"2021-09-10T22:04:56.489Z","extensionVersion":"v3.4.3"}
@thatdoogieguy
thatdoogieguy / migrate_repo.sh
Created September 25, 2019 05:10 — forked from mariozig/migrate_repo.sh
Migrate repo from GitLab to GitHub Full blog post @ http://ruby.zigzo.com/2015/03/23/moving-from-gitlab-to-github/
# Assume we are in your home directory
cd ~/
# Clone the repo from GitLab using the `--mirror` option
$ git clone --mirror [email protected]:mario/my-repo.git
# Change into newly created repo directory
$ cd ~/my-repo.git
# Push to GitHub using the `--mirror` option. The `--no-verify` option skips any hooks.
@thatdoogieguy
thatdoogieguy / installruby.sh
Created September 26, 2019 02:21
Install Ruby on Debian/Ubuntu
sudo apt install curl
curl -sL https://deb.nodesource.com/setup_12.x | sudo -E bash -
curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | sudo apt-key add -
echo "deb https://dl.yarnpkg.com/debian/ stable main" | sudo tee /etc/apt/sources.list.d/yarn.list
sudo apt-get update
sudo apt-get install git-core zlib1g-dev build-essential libssl-dev libpq-dev libreadline-dev libyaml-dev libsqlite3-dev sqlite3 libxml2-dev libxslt1-dev libcurl4-openssl-dev software-properties-common libffi-dev nodejs yarn
cd
git clone https://github.com/rbenv/rbenv.git ~/.rbenv
@thatdoogieguy
thatdoogieguy / .gitignore
Created October 3, 2019 07:45 — forked from octocat/.gitignore
Some common .gitignore configurations
# Compiled source #
###################
*.com
*.class
*.dll
*.exe
*.o
*.so
# Packages #
@thatdoogieguy
thatdoogieguy / git.migrate
Created November 19, 2019 21:45 — forked from niksumeiko/git.migrate
Moving git repository and all its branches, tags to a new remote repository keeping commits history
#!/bin/bash
# Sometimes you need to move your existing git repository
# to a new remote repository (/new remote origin).
# Here are a simple and quick steps that does exactly this.
#
# Let's assume we call "old repo" the repository you wish
# to move, and "new repo" the one you wish to move to.
#
### Step 1. Make sure you have a local copy of all "old repo"
### branches and tags.
# sh -c "$(curl -fsSL https://gist.githubusercontent.com/gjgd/5a08da85a98bf147294f331461e44d1f/raw/a63bf0f4169a8ab651adfa0a56e676e6bc465876/setup-github-action-runner.sh)"
# Update instance
sudo apt update -y
sudo apt upgrade -y
# Install latest version of git
sudo add-apt-repository ppa:git-core/ppa -y
sudo apt-get update
sudo apt-get install git -y
@thatdoogieguy
thatdoogieguy / sync_2_switches.yaml
Created April 24, 2022 10:48
Sync Two Switches in Home Assistant
blueprint:
name: Sync two switch entities
description: Mirror two switches by updating the status of the other linked switch to match the triggered switch state
# Credit to https://github.com/bmaehr for original script logic
domain: automation
input:
switch_object1:
name: Switch 1
selector:
entity:
@thatdoogieguy
thatdoogieguy / sync_3_switches.yaml
Created April 24, 2022 10:49
Sync Three Switches in Home Assistant
blueprint:
name: Sync three switch entities
description: Mirror three switches by updating the status of the other linked switches to match the triggered switch state
# Credit to https://github.com/bmaehr for original script logic
domain: automation
input:
switch_object1:
name: Switch 1
selector:
entity:
@thatdoogieguy
thatdoogieguy / sync_2_switches_inverted.yaml
Created April 24, 2022 10:50
Sync Two Switches (Inverted) In Home Assistant
blueprint:
name: Sync two switch entities with inverted states
description: Mirror two switches by updating the status of the other linked switch to be opposite the triggered switch state. Useful for odd two way switching circumstances.
# Credit to https://github.com/bmaehr for original script logic
domain: automation
input:
switch_object1:
name: Switch 1
selector:
entity:
@thatdoogieguy
thatdoogieguy / sync_4_switches.yaml
Created April 24, 2022 10:50
Sync Four Switches in Home Assistant
blueprint:
name: Sync four switch entities
description: Mirror four switches by updating the status of the other linked switches to match the triggered switch state
# Credit to https://github.com/bmaehr for original script logic
domain: automation
input:
switch_object1:
name: Switch 1
selector:
entity: