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 | |
$configs = [ | |
'test' => [ | |
'alfa' => 'beta' | |
], | |
'gamma' => 'first' | |
]; | |
$iterator = new \RecursiveArrayIterator($configs); |
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 | |
$retries = 0; | |
function fetch() { | |
global $retries; | |
echo "Retry " . $retries . " | "; | |
$opts = array( |
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 | |
namespace TSS\CoreBundle\EventListener; | |
use Psr\Log\LoggerInterface; | |
use Symfony\Component\HttpFoundation\JsonResponse; | |
use Symfony\Component\HttpKernel\Event\GetResponseForExceptionEvent; | |
use Symfony\Component\HttpFoundation\Response; | |
use Symfony\Component\HttpKernel\Exception\HttpExceptionInterface; |
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
// This script downloads Earth images from Himawari-8 satellite. | |
// | |
// After all images saved you can run this to generate video with ffmpeg: | |
// | |
// ffmpeg -framerate 20 -pattern_type glob -i '*.png' -c:v libx264 -pix_fmt yuv420p video.mp4 | |
// ffmpeg -i video.mp4 -i Morning_Mood_by_Grieg.mp3 -vcodec copy -acodec copy -shortest audiovideo.mp4 | |
// ffmpeg -i audiovideo.mp4 -vf pad="ih*16/9:ih:(ow-iw)/2:(oh-ih)/2" output.mp4 | |
// | |
// Most of code here from https://github.com/avinashbot/himawari | |
package main |
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
package main | |
import ( | |
"fmt" | |
"io" | |
"os" | |
s "strings" | |
"github.com/kr/fs" | |
) |
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
var parser = require('html2hscript'), | |
redis = require("redis"), | |
client = redis.createClient(), | |
util = require('util'), | |
diff = require('virtual-dom/diff'), | |
patches, content, oldTree = ''; | |
client.on("error", function (err) { | |
console.log("Error " + err); | |
}); |
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 | |
echo ‘LC_ALL=en_US.UTF-8’ > /etc/environment | |
echo ‘LANG=en_US.UTF-8’ >> /etc/environment | |
apt-get update -y && sudo apt-get -y dist-upgrade | |
apt-get install -y curl | |
apt-get install -y apache2 | |
apt-get install -y php5 | |
apt-get install php5-cli | |
apt-get install -y git |
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 | |
echo ‘LC_ALL=en_US.UTF-8’ > /etc/environment | |
echo ‘LANG=en_US.UTF-8’ >> /etc/environment | |
apt-get install -y python-software-properties | |
add-apt-repository -y ppa:ondrej/php5-oldstable | |
apt-get update -y && apt-get -y upgrade && apt-get -y dist-upgrade | |
apt-get install -y php5 | |
apt-get install php5-cli | |
apt-get install -y curl apache2 git php5-curl php5-intl |
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 -dmemory_limit=-1 /usr/bin/composer update --lock |
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 | |
find . -name .svn -print0 | xargs -0 rm -r | |
paths=`git ls-files --deleted` | |
for path in $paths | |
do | |
echo ${path} to be removed | |
git rm -r $path |
NewerOlder