docker system df # Show docker disk usage, including space reclaimable by pruning
docker container prune # Remove all stopped containers
docker volume prune # Remove all unused volumes
docker image prune # Remove unused images
We trust you have received the usual lecture from the local System | |
Administrator. It usually boils down to these three things: | |
#1) Respect the privacy of others. | |
#2) Think before you type. | |
#3) With great power comes great responsibility. |
find . -name '*.php' ! -type d -exec bash -c 'expand -t 4 "$0" > /tmp/e && mv /tmp/e "$0"' {} \; |
<?php | |
// (string) $message - message to be passed to Slack | |
// (string) $room - room in which to write the message, too | |
// (string) $icon - You can set up custom emoji icons to use with each message | |
public static function slack($message, $room = "engineering", $icon = ":longbox:") { | |
$room = ($room) ? $room : "engineering"; | |
$data = "payload=" . json_encode(array( | |
"channel" => "#{$room}", | |
"text" => $message, |
#!/bin/sh | |
# | |
# redis - this script starts and stops the redis-server daemon | |
# | |
# chkconfig: - 85 15 | |
# description: Redis is a persistent key-value database | |
# processname: redis-server | |
# config: /etc/redis/redis.conf | |
# config: /etc/sysconfig/redis | |
# pidfile: /var/run/redis.pid |
#!/bin/bash | |
# from here: http://www.codingsteps.com/install-redis-2-6-on-amazon-ec2-linux-ami-or-centos/ | |
# and here: https://raw.github.com/gist/257849/9f1e627e0b7dbe68882fa2b7bdb1b2b263522004/redis-server | |
############################################### | |
# To use: | |
# wget https://raw.github.com/gist/2776679/04ca3bbb9f085b192f6aca945120fe12d59f15f9/install-redis.sh | |
# chmod 777 install-redis.sh | |
# ./install-redis.sh | |
############################################### | |
echo "*****************************************" |
server { | |
listen 80; | |
root /var/www/YOUR_DIRECTORY; | |
index index.php index.html index.htm; | |
################################################### | |
# Change "yoururl.com" to your host name | |
server_name yoururl.com; |
$states = [ | |
'AL' => 'Alabama', | |
'AK' => 'Alaska', | |
'AZ' => 'Arizona', | |
'AR' => 'Arkansas', | |
'CA' => 'California', | |
'CO' => 'Colorado', | |
'CT' => 'Connecticut', | |
'DE' => 'Delaware', | |
'FL' => 'Florida', |
# Set up the firewall rules / Policies | |
iptables -P OUTPUT ACCEPT | |
iptables -P INPUT ACCEPT | |
iptables -P FORWARD ACCEPT | |
# Block common attacks | |
iptables -A INPUT -p tcp --tcp-flags ALL NONE -j DROP | |
iptables -A INPUT -p tcp ! --syn -m state --state NEW -j DROP | |
iptables -A INPUT -p tcp --tcp-flags ALL ALL -j DROP |
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="utf-8"> | |
<meta name="viewport" content="width=device-width, initial-scale=1"> | |
<title>Bible Reading Plan</title> | |
<style type="text/css"> | |
html { | |
font-family: "Open Sans"; | |
color: #666; |