The popular open-source contract for web designers and developers by Stuff & Nonsense
- Originally published: 23/12/2008
- Revised date: 15/12/2013
- Original post
<?php | |
/* | |
* Translate a non-standard object into an associative array object. | |
* Super-useful for dealing with simplexml objects. | |
*/ | |
function simpleXML_to_object($obj) | |
{ | |
$data = new StdClass(); | |
if( | |
(is_object($obj) && get_class($obj) == 'SimpleXMLElement') |
function friday(e) { | |
if(e) { | |
// Not doin' nothin', it's Friday. | |
e.preventDefault(); | |
} | |
/************$~I**************************Z********************************* | |
***********O,7.++O$+********************O,..ZI****************************** | |
***********$..$.78.$******************$...7+. ~Z*******************+******** | |
***********.Z.~.7D.O****************O,...,+. ....+Z*************7O+77I*+**** |
cd ~ | |
sudo yum update | |
sudo yum install java-1.7.0-openjdk.i686 -y | |
wget https://github.com/downloads/elasticsearch/elasticsearch/elasticsearch-0.19.9.tar.gz -O elasticsearch.tar.gz | |
tar -xf elasticsearch.tar.gz | |
rm elasticsearch.tar.gz | |
mv elasticsearch-* elasticsearch | |
sudo mv elasticsearch /usr/local/share |
#!/bin/bash | |
filedir=$1; | |
echo "Starting converstion to mp4 script" | |
if [ -d "$filedir" ]; then | |
cd "$filedir" | |
for file in ./* ; | |
do | |
if [[ $file = *.mkv || $file = *.avi ]] ; then |