🤷♂️
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// Include this on your functions.php | |
function log_sql_queries($text_query){ | |
/* //Uncomment me if you want a lot of info about where the sql query comes from and what action started it off | |
$traces = debug_backtrace(); | |
foreach ($traces as $tobj => $trace) { | |
if($trace['function'] == 'do_action'){ | |
$args = $trace['args']; | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# https://github.com/RazrFalcon/svgcleaner/ must be installed | |
find . -type f -name "*.svg" | sudo xargs -I file svgcleaner file file |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Replace the parameters on capital letters | |
ffmpeg -y -ss 30 -t 3 -i EXAMPLE.mp4 -vf fps=10,scale=320:-1:flags=lanczos,palettegen palette.png | |
ffmpeg -ss START_TIME -t DURATION -i EXAMPLE.mp4 -i palette.png -filter_complex "fps=10,scale=320:-1:flags=lanczos[x];[x][1:v]paletteuse" OUTPUT.gif |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Copied from http://snipplr.com/view/36868/ for posterity | |
*/ | |
function country_code_to_country( $code ){ | |
$country = ''; | |
if( $code == 'AF' ) $country = 'Afghanistan'; | |
if( $code == 'AX' ) $country = 'Aland Islands'; | |
if( $code == 'AL' ) $country = 'Albania'; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SHOULD MATCH: | |
http://foo.com/blah_blah | |
http://foo.com/blah_blah/ | |
http://foo.com/blah_blah_(wikipedia) | |
http://foo.com/blah_blah_(wikipedia)_(again) | |
http://www.example.com/wpstyle/?p=364 | |
https://www.example.com/foo/?bar=baz&inga=42&quux | |
http://✪df.ws/123 | |
http://userid:[email protected]:8080 | |
http://userid:[email protected]:8080/ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Título | Tipo | Duración | Popularidad | Fecha | Link | |
---|---|---|---|---|---|---|
Duendeando - 06/12/08 | Completo | 1:59:33 | 32% popularidad | 06 dic 2008 | http://mvod.lvlt.rtve.es/resources/TE_SDUEND/mp3/3/5/1228477463753.mp3 | |
Duendeando - 22/11/08 | Completo | 2:00:53 | 32% popularidad | 22 nov 2008 | http://mvod.lvlt.rtve.es/resources/TE_SDUEND/mp3/7/4/1227190438947.mp3 | |
Duendeando - 15/11/08 | Completo | 2:00:04 | 32% popularidad | 15 nov 2008 | http://mvod.lvlt.rtve.es/resources/TE_SDUEND/mp3/7/8/1226587434987.mp3 | |
Duendeando - 08/11/08 | Completo | 1:59:56 | 32% popularidad | 08 nov 2008 | http://mvod.lvlt.rtve.es/resources/TE_SDUEND/mp3/8/2/1226065380828.mp3 | |
Duendeando - 01/11/08 | Completo | 2:00:34 | 32% popularidad | 01 nov 2008 | http://mvod.lvlt.rtve.es/resources/TE_SDUEND/mp3/6/9/1225705277196.mp3 | |
Duendeando - 25/10/08 | Completo | 1:59:25 | 32% popularidad | 25 oct 2008 | http://mvod.lvlt.rtve.es/resources/TE_SDUEND/mp3/8/6/1224842980068.mp3 | |
Duendeando - 18/10/08 | Completo | 2:00:36 | 32% popularidad | 18 oct 2008 | http://mvod.lvlt.rtve.es/resources/TE_SDUEN |
We can make this file beautiful and searchable if this error is corrected: Unclosed quoted field in line 8.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Título,Tipo,Duración,Popularidad,Fecha,Link | |
"Cab Calloway - 24/10/08",Completo,1:00:34,"32% popularidad","24 oct 2008",https://rtve-mediavod-lote3.rtve.es/resources/TE_SJAZZP/mp3/2/0/1224780860302.mp3 | |
"Dizzy Gillespie - 22/10/08",Completo,1:00:17,"32% popularidad","22 oct 2008",https://rtve-mediavod-lote3.rtve.es/resources/TE_SJAZZP/mp3/0/5/1224583241250.mp3 | |
"Tineke Postma - 20/10/08",Completo,2:00:16,"32% popularidad","20 oct 2008",https://rtve-mediavod-lote3.rtve.es/resources/TE_SJAZZP/mp3/3/1/1224497448413.mp3 | |
"Carsten Daerr - 13/10/08",Completo,2:00:59,"32% popularidad","13 oct 2008",https://rtve-mediavod-lote3.rtve.es/resources/TE_SJAZZP/mp3/3/4/1223901367843.mp3 | |
"Jean-Marie Machado - 01/12/08",Completo,2:00:19,"32% popularidad","01 dic 2008",https://rtve-mediavod-lote3.rtve.es/resources/TE_SJAZZP/mp3/3/0/1227880417803.mp3 | |
"Duke Ellington - 28/11/08",Completo,1:00:30,"32% popularidad","28 nov 2008",https://rtve-mediavod-lote3.rtve.es/resources/TE_SJAZZP/mp3/9/5/1227877220359.mp3 | |
"Charlie Parker - 26/11/0 |
We can make this file beautiful and searchable if this error is corrected: It looks like row 9 should actually have 6 columns, instead of 1 in line 8.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Título,Tipo,Duración,Popularidad,Fecha,Link | |
Segunda hora - 04/10/08,Completo,1:00:00,32% popularidad,04 oct 2008,https://rtve-mediavod-lote3.rtve.es/resources/TE_SATODO/mp3/4/7/1223380115374.mp3 | |
Segunda hora - 27/09/08,Completo,1:03:00,32% popularidad,27 sep 2008, | |
Primera hora - 27/09/08,Completo,1:03:00,32% popularidad,27 sep 2008,https://rtve-mediavod-lote3.rtve.es/resources/TE_SATODO/mp3/9/6/1222521747969.mp3 | |
Segunda hora - 20/09/08,Completo,1:03:00,32% popularidad,20 sep 2008,https://rtve-mediavod-lote3.rtve.es/resources/TE_SATODO/mp3/7/1/1221920506917.mp3 | |
Primera hora - 20/09/08,Completo,1:03:00,32% popularidad,20 sep 2008,https://rtve-mediavod-lote3.rtve.es/resources/TE_SATODO/mp3/4/9/1221916980794.mp3 | |
Segunda hora - 13/09/08,Completo,1:03:00,32% popularidad,13 sep 2008,https://rtve-mediavod-lote3.rtve.es/resources/TE_SATODO/mp3/7/4/1221315742347.mp3 | |
Primera hora - 13/09/08,Completo,1:03:00,32% popularidad,13 sep 2008,https://rtve-mediavod-lote3.rtve.es/resources/TE_SATODO/mp3/5/8/1221312143885.mp3 | |
Segu |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/php -qC | |
<?php | |
/****************************************************************************** | |
* | |
* @file gitolab.php | |
* @author Benoit Zohar | |
* @link http://benoitzohar.fr/ | |
* @last-edited 2015-01-09 | |
* @description Migrate projects from Gitolite to GitLab |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
set -eu | |
if (( $# != 1 )); then | |
echo "Converts ANIMATED-GIF to a video file." | |
echo 1>&2 | |
echo "Usage: gif2mp4 ANIMATED-GIF" 1>&2 | |
exit 1 |