Skip to content

Instantly share code, notes, and snippets.

@ezmac
ezmac / gist:9809076
Last active August 29, 2015 13:57
Installing docker on Debian Wheezy
This will be quick and kind of dirty since I lost the original version when restarting X. My fault. Hopefully, I'll clean this up when I follow it on my laptop. I haven't yet, so it may not work correctly.
I used this page for some of the configuration: http://blog.denevell.org/unix-debian-docker-install.html
According to that page, you need kernel 3.8 or above. I'm running 3.11.10 from backports.
To install from binaries, use the instructions at: http://docs.docker.io/en/latest/installation/binaries/ I installed mine in ~/apps/docker. A summary follows.
mkdir ~/apps/docker
cd !$ # !$ is the argument from previous command. Great trick.
wget https://get.docker.io/builds/Linux/x86_64/docker-latest -O docker
chmod +x docker
@ezmac
ezmac / Readme.md
Last active October 26, 2021 00:31
Developing asp classic apps in linux/vim (using a mounted IIS folder)

This is dumb, but I run linux and have to debug asp classic apps on occasion. The obvious way would be to work in windows with vim for windows, but my shortcuts don't work there and the flow is off. Rather, I use a particular setup to allow me to work seamlessly in linux using a low power windows 8 laptop physically beside my linux machine. With this setup, I don't have to leave linux often, but I have a synergy connection between the two machines, so they share a mouse.

The windows machine has one display, cygwin, and Watch 4 Folder (a free/shareware windows program similar to incrontab). Watch 4 Folder watches the inetpub/logs/FailedReqLogFiles/ folder and subfolders for file create. This happens for FREB (Failed request event buffering). When it happens, it opens the log in IE (because no other browser has the xlst to render it correctly). Additionally, if I have a file that receives debugging statements, I'll keep cygwin at 50% transparent, full screen, and 'tail -f' on the file. A folder for t

@ezmac
ezmac / keto.markdown
Created July 28, 2014 16:55
Paleo/keto as I understand it.

Paleo primer for the masses

This is just a quick primer I threw together. Please point out any mistakes in it. I'm system.root on gmail.

Definitions:

  • Paleo - Short for paleolithic diet, paleo is a lifestyle based on the idea that humans evolved eating meat, fat, fruits, and vegetables without grains or legumes
  • Ketosis - Ketosis is a state of metabolism characterized by higher than "normal" ketones in the blood.
  • Crossfit - A workout plan based on the idea that humans didn't evolve sitting at an office desk all day. It can be summed up as "Move heavy stuff"
  • Carbohydrate - abbreviated carb, it is a macronutrient containing 4 calories per gram
@ezmac
ezmac / gist:bf976ebff45388473713
Created July 11, 2015 00:12
docker run script for slightly less annoying container dev.
#!/bin/bash
pwd=$(printf '%q\n' "${PWD##*/}")
if [ -z $env ]; then
echo "PROD"
#prod use absolute paths here
docker run --name $pwd -i -t -p 80:80 -p 443:443 -v /data/logs:/data/logs:rw -v /data/containers/docker-nginx-front/config/:/data/config/:rw $pwd
elif [[ $env="dev" ]]; then
#dev
@ezmac
ezmac / hammond xk1c updates.txt
Created July 6, 2018 13:53
hammond xk1c updates with large flash drive or usb stick
A friend of mine has a hammond xk1c keyboard and needed to install some updates. The keyboard is known to have some weirdness when it comes to using large flash drives (anything bigger than 512 MB can be hit or miss). I don't know much about the keyboard, but this is something that worked for him. This has been posted on facebook but I'm reposting here so it is public info and findable by google.
I was able to limit the size of the Fat32 partition on a 16GB USB drive to 500MB and then manually create the correct file structure and this made a previously unusable USB work correctly in the XK1C. The is the procedure using Terminal in OSX:
(with no flash drive plugged in)
ls /dev | grep rdisk
(plug in flash drive, wait 10 seconds)
ls /dev | grep rdisk
(you’ll see a new one. Something like rdisk2)
diskutil unmount /dev/rdiskX
@ezmac
ezmac / prompt_aws.zsh
Last active December 3, 2018 14:12
AWS profile zsh prompt indicator
prompt_aws() {
repo_path=$(git rev-parse --git-dir 2>/dev/null)
if [[ -z $AWS_PROFILE ]]; then
return
fi
if [[ ! -z $AWS_PROFILE ]]; then
if [[ $AWS_PROFILE == *"prod"* || $AWS_PROFILE == ${PROD_AWS_PROFILE} ]]; then
prompt_segment red white

Keybase proof

I hereby claim:

  • I am ezmac on github.
  • I am ezmac (https://keybase.io/ezmac) on keybase.
  • I have a public key ASDEgbF7l8rz7rg3AebZGEKA0mvN5Ww42J2-Z1OhHF7Ajwo

To claim this, I am signing this object:

@ezmac
ezmac / discord_readme.md
Last active October 17, 2020 13:09
fix discord's layout

discord layout hack

Discord forces you to have two very large bars which are pretty much useless. A channel list and a members list. I just want chat. Ctrl+shift+I will open Dev Tools. You'll see a warning that 11/10, this is hacking you. It's not, but do your own due dilligence. Paste this and your two side bars will be much smaller.

// general flow: Select all div elements with a class.  Step through each element.  
//   Check if class name contains relevant string.
// if so, set the width to "100px"
@ezmac
ezmac / git-lfs related problem
Created June 17, 2022 14:04
Bug that took me too long to figure out. Adding a gist so it will hopefully get indexed by search engines.
@ezmac
ezmac / fde-ubuntu-dual-boot.md
Last active September 14, 2023 13:25
Every resource I used setting up an encrypted linux whaatever windows dual boot rig

When you get a computer with windows on it, you should reinstall windows to make sure it's clean. Then install linux. Ubuntu will offer to resize the windows partition but won't offer FDE (full disk encryption) with it. Using the first link, you can install linux beside windows with FDE. Doing that should keep your boot order and boot loader correct.

In doing that, I broke my windows partition and needed to reinstall windows after installing linux. This breaks the bootloader. Repair instructions are in the later links.