Skip to content

Instantly share code, notes, and snippets.

Keybase proof

I hereby claim:

To claim this, I am signing this object:

function getVal(name) {
if (pm.variables.has(name)) {
return pm.variables.get(name);
}
if (pm.environment.has(name)) {
return pm.environment.get(name);
}
if (pm.globals.has(name)) {
return pm.globals.get(name);
}
@wojtekk
wojtekk / gitsetup.sh
Created March 25, 2016 16:01
Git configuration
git config --global alias.co checkout
git config --global alias.ci commit
git config --global alias.st status
git config --global alias.br branch
git config --global alias.hist 'log --pretty=format:"%h %ad | %s%d [%an]" --graph --date=short'
git config --global alias.type 'cat-file -t'
git config --global alias.dump 'cat-file -p'
# Add to .bash_profile or .zshenv
# Source: http://stackoverflow.com/questions/18880024/start-ssh-agent-on-login
SSH_ENV="$HOME/.ssh/environment"
function start_agent {
echo "Initialising new SSH agent..."
/usr/bin/ssh-agent | sed 's/^echo/#echo/' > "${SSH_ENV}"
echo succeeded
chmod 600 "${SSH_ENV}"
vagrant global-status --prune
// ==UserScript==
// @name Loteria Paragonowa
// @namespace https://gist.github.com/wojtekk/5eeb18affe9b944ad269
// @version 0.1
// @description try to take over the world!
// @author Wojciech Krawczyk
// @match https://loteriaparagonowa.gov.pl/
// @grant none
// ==/UserScript==
/* jshint -W097 */

Keybase proof

I hereby claim:

To claim this, I am signing this object:

@wojtekk
wojtekk / Add app to users dash in Unity.sh
Created April 23, 2014 07:20
Add app to users dash in Unity
mv *.desktop ~/.local/share/applications/
git config --global branch.master.remote origin
git config --global branch.master.merge refs/heads/master
git config --global branch.develop.remote origin
git config --global branch.develop.merge refs/heads/develop
@wojtekk
wojtekk / Ubuntu Upgrade.sh
Created February 23, 2014 13:18
Upgrade Ubuntu and remove old packages, configs, ...
sudo apt-get update
sudo apt-get -y upgrade
sudo apt-get -y dist-upgrade
sudo apt-get remove --purge $(dpkg -l 'linux-*' | sed '/^ii/!d;/'"$(uname -r | sed "s/\(.*\)-\([^0-9]\+\)/\1/")"'/d;s/^[^ ]* [^ ]* \([^ ]*\).*/\1/;/[0-9]/!d')
sudo apt-get autoremove
sudo apt-get autoclean
sudo apt-get clean
sudo dpkg --purge $(COLUMNS=200 dpkg -l | grep "^rc" | tr -s ' ' | cut -d ' ' -f 2)