Skip to content

Instantly share code, notes, and snippets.

View pmoust's full-sized avatar

Panagiotis Moustafellos pmoust

View GitHub Profile
echo 'echo "$(whoami) ALL=(ALL) NOPASSWD:ALL" >&3' | DYLD_PRINT_TO_FILE=/etc/sudoers newgrp; sudo -s
@pmoust
pmoust / skype-4.3.sh
Last active August 29, 2015 14:03
install latest skype for ubuntu precise/trusty
#!/bin/sh
sudo killall -9 skype
wget -q -O ~/skype-4.3.deb http://www.skype.com/go/getskype-linux-beta-ubuntu-64 &&
sudo apt-get -y remove skype &&
sudo dpkg -i ~/skype-4.3.deb
if [ $? -eq 0 ]; then
echo "\nSkype installed..\n"
fi
rm -f ~/skype-4.3.deb
@pmoust
pmoust / container-memory.sh
Created May 28, 2014 09:10
List memory usage per Docker container
#!/bin/sh
# Lists memory usage per Docker container
#
# FORMAT:
#
# IMAGE:TAG MEMORY_USAGE CONTAINER ID
for i in `find /sys/fs/cgroup/memory/docker/* -type d`; do
CONTAINER_ID=`echo $i | awk -F'/' '{print $7}'`
MEMORY_USAGE=$((`cat $i/memory.usage_in_bytes`/1024/1024))
@pmoust
pmoust / curlj
Created May 12, 2014 15:10
Curl json highlight
sudo apt-get install jq
echo 'curlj() { curl -s "$*" | jq "." }' >> ~/.zshrc
source ~/.zshrc
# curlj -XGET -u YOUR_GITHUB_USERNAME https://api.github.com/user/repos