Skip to content

Instantly share code, notes, and snippets.

View radeksimko's full-sized avatar

Radek Simko radeksimko

View GitHub Profile
@apparentlymart
apparentlymart / Terraform-State-Ideas.md
Last active December 24, 2022 17:10
Terraform State Integrity Issues

Issues with Terraform State Management

The idea of "state" is the lynchpin of Terraform, and yet Terraform's workflow is fraught with gotchas that can lead to the loss or destruction of state. This doc is a set of notes about issues I've encountered, what caused them, and in many cases ideas about how to improve Terraform to avoid or reduce the chances of them.

Each of these scenarios has occured at least within my team. Each time one of these occurs it erodes people's confidence in Terraform, giving it a reputation for being fragile and unforgiving of errors. This this document is not written just to criticize but rather to identify ways in which the situation could be improved.

@kwilczynski
kwilczynski / books.txt
Last active June 9, 2017 14:51
Books, assorted
The Phoenix Project: A Novel About IT, DevOps, and Helping Your Business Win
Japanese: The DevOps 逆転だ!
by Gene Kim, Kevin Behr and George Spafford
English: http://www.amazon.com/product/dp/B00AZRBLHO
Japanese: http://www.amazon.co.jp/product/dp/4822285359
Continuous Delivery: Reliable Software Releases through Build, Test, and Deployment Automation
by Jez Humble and David Farley
English: http://www.amazon.com/product/dp/0321601912
Japanese: -
brew install libvirt
sudo ln -s /opt/vagrant/embedded/include/ruby-2.0.0/{universal-darwin12.6.0,x86_64-darwin12.6.0}
ARCHFLAGS='-arch x86_64' \
CONFIGURE_ARGS="with-libvirt-include=/usr/local/include/libvirt:/opt/vagrant/embedded//include/ruby-2.0.0/universal-darwin12.6.0/ with-libvirt-lib=/usr/local/lib" \
vagrant plugin install vagrant-libvirt
@radeksimko
radeksimko / .bash_profile
Last active December 5, 2019 21:51
New MacOS bootstrap
export GOPATH=$HOME/gopath
# Path
export PATH=/opt/local/bin:/usr/local/bin:/opt/local/sbin:/usr/local/sbin:$PATH
export PATH=/usr/local/share/npm/bin:$PATH # NPM
export PATH=/usr/local/mysql/bin:$PATH # MySQL
export PATH=/usr/local/pear/bin:$PATH # Pear
export PATH=/usr/local/opt/gnu-sed/libexec/gnubin:$PATH # sed
export PATH=$GOPATH/bin:$PATH # Go
cd ~/Library/Application\ Support/Sublime\ Text\ 3/Packages/
git clone git://github.com/wbond/sublime_package_control.git Package\ Control
cd Package\ Control
git checkout python3
# restart Sublime Text 3 and you should have Package Control working
@1stvamp
1stvamp / gist:6051782
Last active December 20, 2015 01:49
vagrant + vmware provider error, I cleared this by opening the VMWare Fusion GUI and forcing a shutdown of the VM which was stuck in a failed boot state.
An error occurred while executing `vmrun`, a utility for controlling
VMware machines. The command and output are below:
Command: ["start", "/Users/wes/projects/serverdensity/Vagrantfiles/honshuu-environment/.vagrant/machines/default/vmware_fusion/vm.vmwarevm/precise64.vmx", "nogui", {:notify=>[:stdout, :stderr]}]
Stdout: 2013-07-22T07:48:28.125| ServiceImpl_Opener: PID 98149
Error: The operation was canceled
Stderr:
@tr3buchet
tr3buchet / gist:5105747
Last active June 8, 2021 05:43
yubikey OR private key ssh authentication on debian

the grand idea

I like public key auth. I feel safer using them instead of a username and password login. But, I might not have my private key with me at a time where I need access.

I started using yubikey with LastPass and since I have it always on my keychain, I decided to find more ways to make use of it.

I wasn't originally aware, but if you pass a private key to ssh and sshd is configured to accept a key, it appears pam isn't used. Your authorized keys are checked and you are logged in. If you don't pass a private key, ssh falls back to the more standard un*x style login found in /etc/pam.d/sshd. This is where we'll add the yubikey pam. I am currently unaware of a way to use both public key auth and yubikey for login.

These steps worked for me on debian squeeze/wheezy.

more info at the yubico-pam github repo

@digitaljhelms
digitaljhelms / gist:3099010
Created July 12, 2012 15:58
Squash the first two commits in a git repository's history

The scenario

Your repository has two commits:

$ git log --oneline
957fbfb No, I am your father.
9bb71ff A long time ago in a galaxy far, far away....
@jboner
jboner / latency.txt
Last active May 28, 2024 18:39
Latency Numbers Every Programmer Should Know
Latency Comparison Numbers (~2012)
----------------------------------
L1 cache reference 0.5 ns
Branch mispredict 5 ns
L2 cache reference 7 ns 14x L1 cache
Mutex lock/unlock 25 ns
Main memory reference 100 ns 20x L2 cache, 200x L1 cache
Compress 1K bytes with Zippy 3,000 ns 3 us
Send 1K bytes over 1 Gbps network 10,000 ns 10 us
Read 4K randomly from SSD* 150,000 ns 150 us ~1GB/sec SSD
@paulmillr
paulmillr / active.md
Last active May 15, 2024 02:25
Most active GitHub users (by contributions). http://twitter.com/paulmillr

Most active GitHub users (git.io/top)

The count of contributions (summary of Pull Requests, opened issues and commits) to public repos at GitHub.com from Wed, 21 Sep 2022 till Thu, 21 Sep 2023.

Only first 1000 GitHub users according to the count of followers are taken. This is because of limitations of GitHub search. Sorting algo in pseudocode:

githubUsers
 .filter(user => user.followers > 1000)