This gist shows how to create a GIF screencast using only free OS X tools: QuickTime, ffmpeg, and gifsicle.
To capture the video (filesize: 19MB), using the free "QuickTime Player" application:
import logging | |
log = logging.getLogger() | |
log.setLevel(logging.DEBUG) | |
def lambda_handler(event, context): | |
bot_event = event | |
command = bot_event['text'] | |
print command | |
print(event) |
FROM alpine:3.3 | |
MAINTAINER Paulo Gomes <pv.gomes89@gmail.com> | |
#Update and Intalation Ubuntu Packages | |
RUN apk update && \ | |
apk upgrade && \ | |
apk add --update \ | |
nginx \ | |
nodejs |
keys = File.readlines('keys.txt'); | |
keys.each do |key| | |
puts key | |
end |
<?php | |
require __DIR__ . 'vendor/autoload.php'; | |
error_reporting(-1); | |
ini_set('display_errors', '1'); | |
$r3 = new Respect\Rest\Router; | |
$r3->get('/ping', function() { | |
return 'pong'; | |
}); |
# Use Alpine Linux | |
FROM alpine:edge | |
# Timezone | |
ENV TIMEZONE America/Sao_Paulo | |
ENV PHP_MEMORY_LIMIT 512M | |
ENV MAX_UPLOAD 50M | |
ENV PHP_MAX_FILE_UPLOAD 200 | |
ENV PHP_MAX_POST 100M |
# HINTS | |
## Add self to the docker group (run docker without sudo) | |
sudo gpasswd -a myusername docker | |
## Get container ID | |
alias dl='docker ps -l -q' | |
## Get container IP | |
docker inspect --format='{{ .NetworkSettings.IPAddress }}' `dl` | |
docker inspect `dl` | grep IPAddress | cut -d '"' -f 4 |
# | |
# The MySQL database server configuration file. | |
# | |
# You can copy this to one of: | |
# - "/etc/mysql/my.cnf" to set global options, | |
# - "~/.my.cnf" to set user-specific options. | |
# | |
# One can use all long options that the program supports. | |
# Run program with --help to get a list of available options and with | |
# --print-defaults to see which it would actually understand and use. |
As I described in my last post (http://tuhrig.de/difference-between-save-and-export-in-docker), there are two ways to persist a Docker images or container: | |
A Docker image can be saved to a tarball and loaded back again. This will preserve the history of the image. | |
# save the image to a tarball | |
docker save <IMAGE NAME> > /home/save.tar | |
# load it back | |
docker load < /home/save.tar | |
A Docker container can be exported to a tarball and imported back again. This will not preserve the history of the container. |
### Remove multiple itens by pattern | |
redis-cli KEYS "prefix:*" | xargs redis-cli DEL | |
By conf | |
redis-cli -h 0.0.0.0 -p 6380 KEYS "*" | xargs redis-cli -h 0.0.0.0 -p 6380 DEL | |