Skip to content

Instantly share code, notes, and snippets.

@number5
number5 / README.md
Last active May 16, 2023 05:48
NixOS configs for reference
@number5
number5 / awscli-pyyaml-fix.md
Last active June 7, 2019 21:12
Temporary workaround to install awscli/boto3 with Homebrew Python 3.7 (before PyYAML fix their python3.7 releases)
  1. pip3 install awscli boto3 (this step will fail but will install all deps exclude pyyaml for us)
  2. pip3 install pyyaml==4.2b4
  3. pip3 install --no-deps awscli boto3

See yaml/pyyaml#193 for what's happening with pyyaml

@number5
number5 / file2.tf
Created January 17, 2018 06:39
use json file in terraform example
resource "aws_iam_policy" "test1" {
name = "test1Policy"
policy = "${file("policy.json")}"
}
@number5
number5 / git-log.md
Last active July 9, 2019 21:40
pretty git log with relative dates and tags

My git log alias

alias gl='git log --graph --pretty=format:'%C(magenta)%h%Creset %w(72,1,2)%Cgreen(%cr) -%C(bold green)%d%Creset %s %C(bold blue)<%an>%Creset' --abbrev-commit --date=relative'

gl screenshot

@number5
number5 / keybase.md
Created January 20, 2015 03:49
Keybase proof (2nd)

Keybase proof

I hereby claim:

  • I am number5 on github.
  • I am number5 (https://keybase.io/number5) on keybase.
  • I have a public key whose fingerprint is B64B 1BAF 3380 4989 0B55 5626 F2A6 3118 9EE7 3283

To claim this, I am signing this object:

@number5
number5 / gist:22b899f2fb43adff1703
Created December 17, 2014 23:00
Keybase proof
### Keybase proof
I hereby claim:
* I am number5 on github.
* I am number5 (https://keybase.io/number5) on keybase.
* I have a public key whose fingerprint is DB66 7991 0546 B0DE 0144 EF10 C57A AB93 CFB1 C349
To claim this, I am signing this object:
@number5
number5 / BUILD.OSX
Created October 31, 2013 14:35
How to compile MultiMC5 on OS X Mountain Lion (should work for 10.6/10.7)
- install homebrew
- brew install qt5
- brew tap homebrew/versions
- brew install gcc48
- brew install cmake
- export CMAKE_PREFIX_PATH=/usr/local/opt/qt5
- cd MultiMC5
- mkdir build
- cd build
- export CC=/usr/local/bin/gcc-4.8
@number5
number5 / gist:6181885
Created August 8, 2013 06:08
curl -v ipconfig.me
* About to connect() to ipconfig.me port 80 (#0)
* Trying 82.98.86.174... connected
> GET / HTTP/1.1
> User-Agent: curl/7.22.0 (x86_64-pc-linux-gnu) libcurl/7.22.0 OpenSSL/1.0.1 zlib/1.2.3.4 libidn/1.23 librtmp/2.3
> Host: ipconfig.me
> Accept: */*
>
* HTTP 1.0, assume close after body
< HTTP/1.0 200 OK
< Date: Thu, 08 Aug 2013 06:07:18 GMT
@number5
number5 / etc-default-grub
Created June 19, 2013 00:05
/etc/default/grub for Ubuntu 12.04 with 3.8.x raring-backport kernel and NVidia driver 319 (fixing the black screen after boot) UEFI with GPT on ASUS G75VW
LANG=C
GRUB_DEFAULT=0
GRUB_TIMEOUT=5
GRUB_DISTRIBUTOR=`lsb_release -i -s 2> /dev/null || echo Debian`
GRUB_CMDLINE_LINUX_DEFAULT="nomodeset acpi_osi=Linux nosplash video=vesa:off resume"
GRUB_CMDLINE_LINUX=""
# Uncomment to disable graphical terminal (grub-pc only)
GRUB_TERMINAL=gfxterm
@number5
number5 / ruby-install.sh
Created January 16, 2013 05:58
Install ruby-1.9.3-p327 with falcon-patch to Ubuntu 12.04 using ruby-build
#! /bin/bash
apt-get install git build-essential libssl-dev libreadline-dev autoconf -y
[! -d ruby-build ] && git clone https://github.com/sstephenson/ruby-build.git
cd ruby-build
curl https://raw.github.com/gist/1688857/2-1.9.3-p327-patched.sh > /tmp/1.9.3-p327-perf
./bin/ruby-build /tmp/1.9.3-p327-perf /usr/local
gem install bundler