Skip to content

Instantly share code, notes, and snippets.

docker rm -f $(docker ps -qa)
docker rmi -f $(docker images -q)
docker volume rm $(docker volume ls -q)
for mount in $(mount | grep tmpfs | grep '/var/lib/kubelet' | awk '{ print $3 }') /var/lib/kubelet /var/lib/rancher; do umount $mount; done
rm -rf /etc/ceph \
/etc/cni \
/etc/kubernetes \
@mariordev
mariordev / us-canada-states.sql
Created May 10, 2016 17:40
Insert statements to seed a table with US and Canadian states.
INSERT INTO states(state_code,state_name,country_code) VALUES ('AL','Alabama','US');
INSERT INTO states(state_code,state_name,country_code) VALUES ('AK','Alaska','US');
INSERT INTO states(state_code,state_name,country_code) VALUES ('AZ','Arizona','US');
INSERT INTO states(state_code,state_name,country_code) VALUES ('AR','Arkansas','US');
INSERT INTO states(state_code,state_name,country_code) VALUES ('CA','California','US');
INSERT INTO states(state_code,state_name,country_code) VALUES ('CO','Colorado','US');
INSERT INTO states(state_code,state_name,country_code) VALUES ('CT','Connecticut','US');
INSERT INTO states(state_code,state_name,country_code) VALUES ('DE','Delaware','US');
INSERT INTO states(state_code,state_name,country_code) VALUES ('DC','District of Columbia','US');
INSERT INTO states(state_code,state_name,country_code) VALUES ('FL','Florida','US');
@nivv
nivv / PHP 7 - Installing imagick on Ubuntu 14.04.md
Last active May 26, 2025 08:41
Guide - Enable imagick on PHP7

Guide

Note The extension Imagick is now included in Ondrej's PPA. All you need to do now is $ sudo apt-get install php-imagick, and you're done. I'll keep the guide here because a lot of it is still true for other extensions

======

I've installed PHP7 via Ondrej's PPA. He maintains these PPA's on his free time, consider donating

Install dependencies

@pascalbaljet
pascalbaljet / imagick-3.4.0-PHP7-forge.sh
Last active January 5, 2025 21:49
Install Imagick 3.4.0 on PHP 7.0 server (Laravel Forge)
#!/bin/bash
if [ "$EUID" -ne 0 ]
then echo "Please run as root"
exit
fi
apt-get install pkg-config libmagickwand-dev -y
cd /tmp
wget https://pecl.php.net/get/imagick-3.4.0.tgz
tar xvzf imagick-3.4.0.tgz
@dergachev
dergachev / GIF-Screencast-OSX.md
Last active June 9, 2025 07:27
OS X Screencast to animated GIF

OS X Screencast to animated GIF

This gist shows how to create a GIF screencast using only free OS X tools: QuickTime, ffmpeg, and gifsicle.

Screencapture GIF

Instructions

To capture the video (filesize: 19MB), using the free "QuickTime Player" application: