Skip to content

Instantly share code, notes, and snippets.

View lytedev's full-sized avatar

Daniel Flanagan lytedev

View GitHub Profile
@lytedev
lytedev / netlify-ddns.bash
Created June 22, 2020 16:37
Netlify DDNS
#!/usr/bin/env bash
# options
TTL="120"
SUBDOMAINS=(host1 host2 host3)
ACCESS_TOKEN="???"
DOMAIN="lyte.dev"
# constants
DNS_ZONE="$(<<< "$DOMAIN" sd "\." "_")"
@lytedev
lytedev / migration.exs
Last active March 28, 2019 22:54
Ecto Many to Many
def change do
# indices omitted
create table(:products) do
add(:name, :string)
end
create table(:product_attributes) do
add(:property, :json)
add(:product_type_id, :id)
@lytedev
lytedev / readme.md
Created January 25, 2019 04:23
Gitea Deployment

My Gitea Deployment

docker run -d \
	-e USER_UID=1000 \
	-e USER_GID=1000 \
	-e APP_NAME="git.faceless.lytedev.io" \
	-e RUN_MODE="prod" \
	-e SSH_DOMAIN="git.faceless.lytedev.io" \
	-e SSH_PORT="22" \
@lytedev
lytedev / readme.md
Last active March 7, 2019 15:06
Common Ubuntu Installation Scripts

Ubuntu 18.04 LTS Installation Scripts

Docker

sudo apt update
sudo apt install apt-transport-https ca-certificates curl software-properties-common -y
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu bionic stable"
sudo apt update
sudo apt update
sudo apt install apt-transport-https ca-certificates curl software-properties-common -y
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu bionic stable"
sudo apt update
sudo apt install docker-ce -y
sudo apt-get install python3 python3-pip -y
sudo pip3 install docker-compose
@lytedev
lytedev / keybase_proof.md
Created August 10, 2018 14:20
Keybase Proof

Keybase proof

I hereby claim:

  • I am lytedev on github.
  • I am lytedev (https://keybase.io/lytedev) on keybase.
  • I have a public key ASBL9t_fBPHgHfXDpjdG_WvWrzywmZCE4YFQxEoEjw-dEQo

To claim this, I am signing this object:

@lytedev
lytedev / theme.xml
Created December 19, 2017 00:46 — forked from anonymous/theme.xml
Eclipse Lyte Theme Color Scheme Port
<?xml version="1.0" encoding="utf-8"?>
<colorTheme id="66" name="Sublime Text 2" modified="2011-01-29 11:20:12" author="Filip Minev">
<searchResultIndication color="#D8D8D8" />
<filteredSearchResultIndication color="#D8D8D8" />
<occurrenceIndication color="#000000" />
<writeOccurrenceIndication color="#000000" />
<findScope color="#000000" />
<deletionIndication color="#FF0000" />
<sourceHoverBackground color="#FFFFFF" />
<singleLineComment color="#666666" />
@lytedev
lytedev / advent-of-code-2017-1-solution-1.0.py
Last active December 1, 2017 21:11
Advent of Code - 2017 Day 1 Solution
#!/usr/bin/env python3
import sys
def digits(digitString):
index = 0
final = 0
while index < len(digitString):
ds1 = digitString[index]
ds2 = "-1"
#!/usr/bin/env bash
sudo modprobe uinput
sudo killall wii-u-gc-adapter
sudo wii-u-gc-adapter --raw &
dolphin-emu