Skip to content

Instantly share code, notes, and snippets.

View AriTheElk's full-sized avatar
caffeinated

Aria McKinley AriTheElk

caffeinated
View GitHub Profile
@AriTheElk
AriTheElk / readme.md
Created November 27, 2019 07:08
Advanced Git Operations

Undo last commit without reverting

git reset HEAD~1 --soft
@AriTheElk
AriTheElk / tempcontrol
Last active November 11, 2019 19:17
increase/decreate Gnome's night light temperature from the command line
#!/bin/bash
TEMP_MIN=1000
TEMP_MAX=10000
RAW_TEMPERATURE=$(gsettings get org.gnome.settings-daemon.plugins.color night-light-temperature)
COLOR_TEMP=${RAW_TEMPERATURE//uint32/}
GRANULARITY=500
@AriTheElk
AriTheElk / machine.js
Last active October 29, 2019 00:07
Generated by XState Viz: https://xstate.js.org/viz
const appMachine = Machine({
id: "tabs",
initial: "search",
states: {
search: {
on: {
HELP: "help",
SETTINGS: "settings"
}
},
@AriTheElk
AriTheElk / gpg_key_backup.md
Last active June 4, 2022 11:53
Backup/Restore GPG key

The following is the procedure I use on UNIX systems:

First, export all public certificates into a public keyring:

$ gpg --armor --export > pub.asc

Second, export all secret certificates into a secret keyring:

@AriTheElk
AriTheElk / My Title
Created April 12, 2016 08:09
This sexy description
my fucking content
@AriTheElk
AriTheElk / My Title
Created April 12, 2016 08:08
This sexy description
my fucking content
@AriTheElk
AriTheElk / My Title
Created April 12, 2016 08:01
This sexy description
my fucking content
@AriTheElk
AriTheElk / gist:5517980
Created May 4, 2013 16:21
Mathematical algorithm for mixing two RGB colors together.
[R, G, B] = min(ColorOneRed + ColorTwoRed, 255), min(ColorOneGreen + ColorTwoGreen, 255), min(ColorOneBlue+ ColorTwoBlue, 255)
rsync -v --progress --ignore-existing -e ssh ./local/folder/* username@address:/directory/to/upload/to/
@AriTheElk
AriTheElk / file_mover.py
Last active December 15, 2015 06:28
Recursively searches for files with the specified extension in the source folder and moves them into the destination folder. You can replace "fileExtension == extension" with "fileExtension != extension" to move every file except for the specified extension.
import sys, os
source = "./Source_Folder/"
destination = "./Destination_Folder/"
extension = ".xml"
fileList = []
for root, folders, files in os.walk(source):
for f in files:
fileName, fileExtension = os.path.splitext(os.path.join(root,f))