Skip to content

Instantly share code, notes, and snippets.

View useafterfree's full-sized avatar
🤘
Please add pointing to projects, tx

Nathan Trujillo useafterfree

🤘
Please add pointing to projects, tx
View GitHub Profile
function deleteBranch()
{
BRANCH=$1
git push origin :$BRANCH
git branch -D $BRANCH
}
function renamebranch () {
OLD="$1"
#!/bin/sh
set -e
PLISTBUDDY=/usr/libexec/PlistBuddy
BLACKLIST_URL=https://raw.githubusercontent.com/Benjamin-Dobell/nvidia-update/master/BLACKLIST
UPDATE_URL=https://gfe.nvidia.com/mac-update
SYSTEM_BUILD=$(system_profiler SPSoftwareDataType | grep 'System Version:' | cut -d '(' -f 2 | cut -d ')' -f 1)
@useafterfree
useafterfree / fix_dns.sh
Created July 6, 2018 00:32
This will fix DNS issues for Rancher on Ubuntu 16 and 18.
if cat /etc/lsb-release | grep -q 18; then
rm /etc/resolv.conf
ln -s /run/systemd/resolve/resolv.conf /etc/resolv.conf
reboot now
else
FILE=/etc/NetworkManager/NetworkManager.conf;
cat $FILE | grep dnsmasq;
sed -i 's/^dns=dnsmasq/#dns=dnsmasq/g' $FILE;
cat $FILE | grep dnsmasq;
systemctl restart NetworkManager;
@useafterfree
useafterfree / ClipboardActionTransformations.xml
Created May 30, 2018 00:06
MacOS shortcut binding for `Microsoft Remote Desktop Client`
<?xml version="1.0" encoding="utf-8" ?>
<!-- transformation for clipboard actions (cut copy paste) -->
<!-- layout specific -->
<layouts>
<!-- Dvorak X C V are not on same physical position as on US keyboard. -->
<layout name="com.apple.keylayout.Dvorak">
<transformations>
<!-- Command+X to Control+X -->
<transform>
<from command="1" key="B" />
@useafterfree
useafterfree / bio_unpack.py
Created March 29, 2018 00:22 — forked from XVilka/bio_unpack.py
Unpacks *.BIO and *.CAP EFI capsule files
#!/bin/env python
import ctypes
import struct
import sys
import os
import array
EFI_CAPSULE_GUID = "BD86663B760D3040B70EB5519E2FC5A0".decode('hex') # 3B6686BD-0D76-4030-B70E-B5519E2FC5A0
EFI2_CAPSULE_GUID = "8BA63C4A2377FB48803D578CC1FEC44D".decode('hex') # 4A3CA68B-7723-48FB-803D-578CC1FEC44D
UEFI_CAPSULE_GUID = "B9829153B5AB9143B69AE3A943F72FCC".decode('hex') # 539182B9-ABB5-4391-B69A-E3A943F72FCC