ror, scala, jetty, erlang, thrift, mongrel, comet server, my-sql, memchached, varnish, kestrel(mq), starling, gizzard, cassandra, hadoop, vertica, munin, nagios, awstats
- Enable the tracer on your xdebug.ini file (see the
xdebug.ini
file). - If you are gonna trace an http request, make sure your
xdebug.trace_output_dir
is writable by the webserver user (www-data). - Execute your script or your request. You can use
produce_segmentation.php
to test. - See the trace file(s) on your
xdebug.trace_output_dir
.
#!/bin/sh | |
# Converts a mysqldump file into a Sqlite 3 compatible file. It also extracts the MySQL `KEY xxxxx` from the | |
# CREATE block and create them in separate commands _after_ all the INSERTs. | |
# Awk is choosen because it's fast and portable. You can use gawk, original awk or even the lightning fast mawk. | |
# The mysqldump file is traversed only once. | |
# Usage: $ ./mysql2sqlite mysqldump-opts db-name | sqlite3 database.sqlite | |
# Example: $ ./mysql2sqlite --no-data -u root -pMySecretPassWord myDbase | sqlite3 database.sqlite |
<?php | |
/* | |
GlobalMercator - part of Aggregate Map Tools | |
Version 1.0 | |
Copyright (c) 2009 The Bivings Group | |
All rights reserved. | |
Author: John Bafford | |
http://www.bivings.com/ | |
http://bafford.com/softare/aggregate-map-tools/ |
Reposted from Qiita
For almost a year now, I've been using this "flux" architecture to organize my React applications and to work on other people's projects, and its popularity has grown quite a lot, to the point where it shows up on job listings for React and a lot of people get confused about what it is.
There are a billion explainations on the internet, so I'll skip explaining the parts. Instead, let's cut to the chase -- the main parts I hate about flux are the Dispatcher and the Store's own updating mechanism.
If you use a setup similar to the examples in facebook/flux, and you use flux.Dispatcher, you probably have this kind of flow:
#!/bin/python | |
# -*- coding: utf-8 -*- | |
from time import sleep | |
from random import randint | |
from selenium import webdriver | |
from pyvirtualdisplay import Display | |
class MuncherySpider(): |
- Get and Start Kong and Co
git clone [email protected]:Mashape/docker-kong.git
cd docker-kong/compose
docker-compose up
- Create Kong API Route
Once in a while, you may need to cleanup resources (containers, volumes, images, networks) ...
// see: https://github.com/chadoe/docker-cleanup-volumes
$ docker volume rm $(docker volume ls -qf dangling=true)
$ docker volume ls -qf dangling=true | xargs -r docker volume rm
# to cut first 3 seconds and length 8 seconds (custom step done for each file) | |
ffmpeg -ss 3 -t 8 -i VID00080.MP4 -vcodec copy -acodec copy white.MP4 | |
# to burn in the timecode (r=framerate) (use in loop like below) | |
# ffmpeg -i $MOVIE -vf "drawtext=fontfile=/Users/artsyinc/Library/Fonts/PxPlus_VGA_SquarePx.ttf: fontsize=128: timecode='00\:00\:00\:00': r=30: x=(w-tw)/2: y=h-(2*lh): fontcolor=white: box=1: boxcolor=0x00000000@1" timecode/$MOVIE | |
# to speed up | |
for MOVIE in $(ls | grep MP4); | |
do LENGTH=$(ffprobe -i $MOVIE -show_format -loglevel quiet | egrep -oE 'duration=(\d+)' | awk -F= '{print $2}'); | |
RATIO=$(echo 7.0/$LENGTH | bc -l); |