This file contains 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 | |
# Anh Nguyen <[email protected]> | |
# 2016-04-30 | |
# MIT License | |
# This script takes in same-size images from a folder and make a crossfade video from the images using ffmpeg. | |
# Make sure you have ffmpeg installed before running. | |
# The output command looks something like the below, but for as many images as you have in the folder. |
This file contains 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 | |
$files = glob('orig/*.jpg'); | |
foreach($files as $file) { | |
$newname = substr($file, 7, 2) . substr($file, 5, 2) . substr($file, 9); | |
$txt = substr($file, 5, 2) . '.' . substr($file, 7, 2) . '.' . substr($file, 9, 4); | |
exec('convert '.$file.' -resize 666x1170 \( xc:transparent -font PT_Sans-Narrow-Web-Bold.ttf -pointsize 50 -fill black -draw "rotate -4 text 20,60 '."'".$txt."'".'" -blur 0x1 \) -geometry +2+2 -composite -font PT_Sans-Narrow-Web-Bold.ttf -fill white -pointsize 50 -draw "text 20,60 '."'".$txt."'".'" renamed/'.$newname); | |
} |
This file contains 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
## karšu lasītājs | |
apt-get install pcscd pcsc-tools | |
pcsc_scan | |
## eparakstītājs: https://www.eparaksts.lv/lv/lejupielades | |
## pārējā draza | |
wget https://www.eparaksts.lv/files/ep3updates/debian/pool/eparaksts/l/latvia-eid-middleware/latvia-eid-middleware_2.0.6-1_amd64.deb | |
dpkg -i latvia-eid-middleware_2.0.6-1_amd64.deb |
This file contains 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 | |
# Drop every second frame from GIF image, | |
# using the same process as https://ezgif.com/optimize | |
# | |
# usage: | |
# frame_drop.sh in.gif out.gif | |
numframes=`gifsicle $1 -I | grep -P "\d+ images" --only-matching | grep -P "\d+" --only-matching` | |
frames=`expr $numframes - 1` |
This file contains 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
//coalesce and resize as seen on https://ezgif.com/resize | |
exec(CONVERT . " '" . IMG_PATH . "/tmp/" . $file . "' -coalesce '" . IMG_PATH . "/tmp/coalesce_" . $file . "'"); | |
exec(CONVERT . " -size " . $imsize[0] . "x" . $imsize[1] . " '" . IMG_PATH . "/tmp/coalesce_" . $file . "' -resize " . $width . "x" . $height . " '" . IMG_PATH . "/tmp/nonopt_" . $out . "'"); | |
//compress to save bandwidth | |
exec(GIFSICLE . " -O3 --lossy=30 '" . IMG_PATH . "/tmp/nonopt_" . $out . "' >'" . IMG_PATH . "/tmp/" . $out . "'"); |
This file contains 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
public function getSelectOptions($column) { | |
$type = $this->getColumnType($column); | |
$menus = array(); | |
preg_match_all("/'(.*?)'/", $type, $enums); | |
if (!empty($enums[1])) { | |
foreach ($enums[1] as $menu) { | |
$menus[$menu] = str_replace('_', ' ', ucfirst(__($menu))); |
This file contains 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
function embed_youtube($params) { | |
var_dump($params); | |
//druka ārā embed kodu, | |
//var atvilkt title un sīkbildi caur api, | |
//pieglabāt lokāli, vai ko nu katram vajag | |
} | |
$txt = preg_replace_callback("#(^|[\n ]|<a(.*?)>)https?://(www\.)?youtube\.com/watch\?v=([a-zA-Z0-9\-_]+)((.*?)</a>)?#im", embed_youtube, $txt); |
This file contains 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
# | |
# My varnish config | |
# caches all static files (images, js, css, txt, flash) | |
# but requests from backend dinamic content | |
# | |
# webserver | |
backend default { | |
.host = "127.0.0.1"; | |
.port = "8080"; |
This file contains 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 | |
optimize() { | |
jpegoptim *.jpg --strip-all | |
optipng *.png | |
for i in * | |
do | |
if test -d $i | |
then | |
cd $i | |
echo $i |
This file contains 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
0-mail.com | |
0815.ru | |
0845.ru | |
0clickemail.com | |
0wnd.net | |
0wnd.org | |
10mail.com | |
10mail.org | |
10minutemail.cf | |
10minutemail.co.za |
NewerOlder