Skip to content

Instantly share code, notes, and snippets.

View daxmc99's full-sized avatar

Dax McDonald daxmc99

View GitHub Profile
@daxmc99
daxmc99 / XPS-15 9560 Getting Nvidia To Work on KDE Neon
Created September 28, 2017 19:46 — forked from whizzzkid/XPS-15 9560 Getting Nvidia To Work on KDE Neon
Making Nvidia Drivers + CUDA 8 + Bumblebee work together on XPS 15 Early 2017 9560 kabylake. Ubuntu, KDE Neon, Linux Mint, debian.
# Instructions for 4.13 and cuda 9.0 RC
# If upgrading from 4.11 and cuda 8.0
$ sudo apt-get purge --auto-remove libcud*
$ sudo apt-get purge --auto-remove cuda*
$ sudo apt-get purge --auto-remove nvidia*
# also remove the container directory direcotory at /usr/local/cuda-8.0/
# Install Intel Graphics Patch Firmwares (This should reboot your system):
bash -c "$(curl -fsSL http://bit.ly/IGFWL-install)"
@daxmc99
daxmc99 / GetGithubRaw.sh
Created May 2, 2019 20:42 — forked from jwebcat/gist:5122366
Properly download from github using wget and curl
wget --no-check-certificate --content-disposition https://github.com/joyent/node/tarball/v0.7.1
# --no-check-cerftificate was necessary for me to have wget not puke about https
curl -LJO https://github.com/joyent/node/tarball/v0.7.1
@daxmc99
daxmc99 / README.md
Created May 21, 2019 16:06 — forked from joyrexus/README.md
collapsible markdown

collapsible markdown?

CLICK ME

yes, even hidden code blocks!

print("hello world!")
@daxmc99
daxmc99 / rancher2_embedded_etcd_query.md
Created June 14, 2019 17:53 — forked from superseb/rancher2_embedded_etcd_query.md
Rancher 2 single install embedded etcd query

Rancher 2 single install embedded etcd query

Option 1: run etcd image matching the embedded version and re-use container network to use etcdctl

docker run -e ETCDCTL_API=3 --net=container:$(docker ps | grep -E "rancher/rancher:|rancher/rancher |rancher/rancher@|rancher_rancher" | awk '{ print $1 }') quay.io/coreos/etcd:v$(docker exec $(docker ps | grep -E "rancher/rancher:|rancher/rancher |rancher/rancher@|rancher_rancher" | awk '{ print $1 }') curl -s http://localhost:2379/version | docker run -i oildex/jq:1.6 jq -r .etcdserver) etcdctl get / --prefix --keys-only

Option 2: use curl to talk to the embedded etcd and decode using jq

@daxmc99
daxmc99 / rancher2customnodecmd.sh
Created July 11, 2019 21:32 — forked from superseb/rancher2customnodecmd.sh
Add custom node to Rancher 2.0 (from v2.0.0-alpha26 and up)
#!/bin/bash
docker run -d -p 80:80 -p 443:443 --name rancher-server rancher/rancher:latest
while ! curl -k https://localhost/ping; do sleep 3; done
# Login
LOGINRESPONSE=`curl -s 'https://127.0.0.1/v3-public/localProviders/local?action=login' -H 'content-type: application/json' --data-binary '{"username":"admin","password":"admin"}' --insecure`
LOGINTOKEN=`echo $LOGINRESPONSE | jq -r .token`
# Change password
@daxmc99
daxmc99 / dropdown.md
Created August 15, 2019 23:16 — forked from citrusui/dropdown.md
"Dropdowns" in Markdown
How do I dropdown?
This is how you dropdown.

<details>
<summary>How do I dropdown?</summary>
<br>
This is how you dropdown.
@daxmc99
daxmc99 / docker-for-mac.md
Last active November 4, 2019 20:06 — forked from BretFisher/docker-for-mac.md
Getting a Shell in the Docker for Mac Moby VM

2018 Update: Easiest option is Justin's repo and image

Just run this from your Mac terminal and it'll drop you in a container with full permissions on the Moby VM. This also works for Docker for Windows for getting in Moby Linux VM (doesn't work for Windows Containers).

docker run -it --rm --privileged --pid=host justincormack/nsenter1

more info: https://github.com/justincormack/nsenter1


@daxmc99
daxmc99 / iterm2-solarized.md
Created February 21, 2020 05:26 — forked from kevin-smets/iterm2-solarized.md
iTerm2 + Oh My Zsh + Solarized color scheme + Source Code Pro Powerline + Font Awesome + [Powerlevel10k] - (macOS)

Default

Default

Powerlevel10k

Powerlevel10k

@daxmc99
daxmc99 / tmux-cheatsheet.markdown
Created March 26, 2020 17:42 — forked from MohamedAlaa/tmux-cheatsheet.markdown
tmux shortcuts & cheatsheet

tmux shortcuts & cheatsheet

start new:

tmux

start new with session name:

tmux new -s myname
@daxmc99
daxmc99 / .gitconfig
Created May 6, 2020 16:05 — forked from johnpolacek/.gitconfig
My current .gitconfig aliases
[alias]
co = checkout
cob = checkout -b
coo = !git fetch && git checkout
br = branch
brd = branch -d
brD = branch -D
merged = branch --merged
st = status
aa = add -A .