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 | |
class Cipher extends CApplicationComponent{ | |
private $securekey, $iv; | |
public function init(){ | |
$this->securekey = hash('sha256', 'SADFo92j!!zVnz@Sj!39IU%YGvi^6eL8&v6*Rv(JH8)Cytuiouh547vCytdyUFl76R', true); | |
$this->iv = mcrypt_create_iv(32); | |
} |
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 | |
$params = array_merge( | |
require(__DIR__ . '/../../common/config/params.php'), | |
require(__DIR__ . '/../../common/config/params-local.php'), | |
require(__DIR__ . '/params.php'), | |
require(__DIR__ . '/params-local.php') | |
); | |
return [ | |
'id' => 'app-frontend', |
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 | |
$params = array_merge( | |
require(__DIR__ . '/../../common/config/params.php'), | |
require(__DIR__ . '/../../common/config/params-local.php'), | |
require(__DIR__ . '/params.php'), | |
require(__DIR__ . '/params-local.php') | |
); | |
return [ | |
'id' => 'app-frontend', |
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 http = require('http'); | |
var path = require('path'); | |
var fs = require('fs'); | |
var stream = require('stream'); | |
http.createServer(function (req, res) { | |
//res.writeHead(200, {'Content-Type': 'text/plain'}); | |
var filename = [__dirname, 'file.mp3'].join(path.sep); |
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 http = require('http'); | |
var path = require('path'); | |
var fs = require('fs'); | |
//var stream = require('stream'); | |
http.createServer(function (req, res) { | |
var filename = [__dirname, 'file.mp3'].join(path.sep); | |
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 | |
return array( | |
'basePath' => dirname(__FILE__) . DS . '..' , | |
'language' => 'fa' , | |
'theme' => 'dream' , | |
'name' => 'پرشین مگز', | |
'import' => array( | |
'application.controllers.*', | |
'application.models.*', |
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
/* | |
* get user roles | |
*/ | |
public function getRoles(){ | |
$roles = array(); | |
$sql = sprintf('select itemname from %s where userid = %d', Yii::app()->authManager->assignmentTable, Yii::app()->user->id); | |
//cache dependency |
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
@font-face { | |
font-family: "nassim"; | |
src: url('../fonts/nassim-regular.eot?1387626872'); | |
src: url('../fonts/nassim-regular.eot?&1387626872#iefix') format('embedded-opentype'), url('../fonts/nassim-regular.woff?1387626920') format('woff'), url('../fonts/nassim-regular.ttf?1387626940') format('truetype'); | |
font-weight: "normal"; | |
font-style: "normal"; | |
} |
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
# | |
# How to use | |
# ./concat main_video.mp4 prefix_video.mp4 output.mp4 | |
# | |
# | |
rm -rf $3 | |
SILENT="-loglevel panic" | |
SILENT="" |
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
rm -rf $3 | |
START=$(($(date +%s)*1000)) | |
SILENT="-loglevel panic" | |
SILENT="" | |
# get video size | |
eval $(ffprobe -v error -of flat=s=_ -select_streams v:0 -show_entries stream=height,width $1) | |
size=${streams_stream_0_width}:${streams_stream_0_height} |
OlderNewer