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 | |
/** | |
* simple method to encrypt or decrypt a plain text string | |
* initialization vector(IV) has to be the same when encrypting and decrypting | |
* | |
* @param string $action: can be 'encrypt' or 'decrypt' | |
* @param string $string: string to encrypt or decrypt | |
* | |
* @return string | |
*/ |
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
# How to install the hhvm package using yum on CentOS 6.6 with Plesk 11.5 | |
# Note that you can also install hhvm from source. For that check the official guides here: | |
# https://github.com/facebook/hhvm/wiki/Building-and-installing-HHVM-on-CentOS-6.6#13-install-ocaml | |
cd /etc/yum.repos.d | |
sudo wget http://www.hop5.in/yum/el6/hop5.repo | |
yum clean all |
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
storefront = { | |
'AL':'143575', | |
'DZ':'143563', | |
'AO':'143564', | |
'AI':'143538', | |
'AG':'143540', | |
'AR':'143505', | |
'AM':'143524', | |
'AU':'143460', | |
'AT':'143445', |
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 | |
// | |
// taken from http://stackoverflow.com/questions/4357073/on-the-fly-zipping-streaming-of-large-files-in-php-or-otherwise | |
// | |
// make sure to send all headers first | |
// Content-Type is the most important one (probably) | |
// | |
header('Content-Type: application/octet-stream'); | |
header('Content-disposition: attachment; filename="file.zip"'); |
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
<div class="spinner"> | |
<div class="rect1"></div> | |
<div class="rect2"></div> | |
<div class="rect3"></div> | |
<div class="rect4"></div> | |
<div class="rect5"></div> | |
</div> | |
<style> | |
.spinner { | |
margin: 100px auto; |
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
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="UTF-8"> | |
<title></title> | |
</head> | |
<body> | |
<video></video> | |
<br/> | |
<input type="file" name="file" id="fileItem" onchange="onChange()" > |
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
var mediaJSON = { "categories" : [ { "name" : "Movies", | |
"videos" : [ | |
{ "description" : "Big Buck Bunny tells the story of a giant rabbit with a heart bigger than himself. When one sunny day three rodents rudely harass him, something snaps... and the rabbit ain't no bunny anymore! In the typical cartoon tradition he prepares the nasty rodents a comical revenge.\n\nLicensed under the Creative Commons Attribution license\nhttp://www.bigbuckbunny.org", | |
"sources" : [ "http://commondatastorage.googleapis.com/gtv-videos-bucket/sample/BigBuckBunny.mp4" ], | |
"subtitle" : "By Blender Foundation", | |
"thumb" : "images/BigBuckBunny.jpg", | |
"title" : "Big Buck Bunny" | |
}, | |
{ "description" : "The first Blender Open Movie from 2006", | |
"sources" : [ "http://commondatastorage.googleapis.com/gtv-videos-bucket/sample/ElephantsDream.mp4" ], |
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 | |
$year = 2014; | |
$month = 10; | |
$day = 21; | |
$hour = 14; | |
$min = 00; | |
$sec = 00; | |
$target = mktime($hour, $min, $sec, $month, $day, $year); | |
$current = time(); |
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 | |
echo Backing up your sources.list... | |
cp /etc/apt/sources.list /etc/apt/sources.list.bak | |
echo Adding the sid repo to sources.list... | |
echo deb http://ftp.us.debian.org/debian/ sid main >> /etc/apt/sources.list | |
echo Updating the sid packages list... | |
apt-get update |
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
$filename(json,utf-8){$loop(%_filename_ext%)$puts(CountMax,%_counter%)$loopend() | |
"numSongs": $get(CountMax), | |
"songs": '[' | |
$loop(%_filename_ext%) { | |
"title": "%title%", | |
"album": "%album%", | |
"artist": "%artist%", | |
"album_artist": "%albumartist%", | |
"composer": "$meta(composer,1)", | |
"publisher": "%publisher%", |