Skip to content

Instantly share code, notes, and snippets.

View radeksimko's full-sized avatar

Radek Simko radeksimko

View GitHub Profile
@macek
macek / advanced_output
Created September 24, 2010 20:44
Output Buffering with Ruby
A contents <<<
send this to a
this goes to a
a, I forgot to add this
<<<
B contents <<<
this goes to b
b, please
<<<
@davidnunez
davidnunez / gist:1404789
Created November 29, 2011 13:20
list all installed packages in android adb shell
pm list packages -f

tmux cheatsheet

As configured in my dotfiles.

start new:

tmux

start new with session name:

@paulmillr
paulmillr / active.md
Last active July 15, 2024 10:55
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 =&gt; user.followers &gt; 1000)
@jboner
jboner / latency.txt
Last active July 17, 2024 03:12
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
@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....
@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

@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:
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
@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