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 | |
$multi_array = array( | |
'foo' => array( | |
'bar' => (object) array( 'baz' => 'bat' ), | |
), | |
); | |
var_dump( iterator_to_array( new RecursiveIteratorIterator( new RecursiveArrayIterator( $multi_array ) ) ) ); |
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
package hu.tcz.udder; | |
import com.xuggle.xuggler.io.IURLProtocolHandler; | |
import com.xuggle.xuggler.io.IURLProtocolHandlerFactory; | |
import org.apache.hadoop.io.BytesWritable; | |
import java.util.Arrays; | |
import java.util.HashMap; | |
import java.util.UUID; | |
public class BytesWritableUrlHandler implements IURLProtocolHandlerFactory { |
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 Clock = function( element ) | |
{ | |
this.element = element; | |
this._schedule(); | |
} | |
Clock.prototype._schedule = function() | |
{ | |
var self = this; |
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
function rot13( text ) | |
{ | |
var results = []; | |
var charcode; | |
for ( var i = 0; i < text.length; ++i ) | |
{ | |
charcode = text.charCodeAt( i ); | |
if ( charcode < 65 || charcode > 90 ) | |
{ |
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 | |
// | |
// $Id: sphinxapi.php 3087 2012-01-30 23:07:35Z shodan $ | |
// | |
// | |
// Copyright (c) 2001-2012, Andrew Aksyonoff | |
// Copyright (c) 2008-2012, Sphinx Technologies Inc |
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 | |
INNOBACKUP="/root/percona-xtrabackup/innobackupex" | |
INNOBACKUP_OPTIONS="--defaults-file=/etc/my.cnf --ibbackup=/root/percona-xtrabackup/mysql-5.5/storage/innobase/xtrabackup/xtrabackup_innodb55 --parallel=4 --user=root --password=XXXXXXX" | |
BACKUPDIR="/var/sqlbackup/" | |
S3BUCKET="db_backup" | |
echo "Removing old local backups" | |
cd $BACKUPDIR |
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/sh | |
# | |
# /etc/rc.d/init.d/supervisord | |
# | |
# Supervisor is a client/server system that | |
# allows its users to monitor and control a | |
# number of processes on UNIX-like operating | |
# systems. | |
# | |
# chkconfig: - 64 36 |
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
#include <stdio.h> | |
#include <string.h> | |
#include <sys/types.h> | |
#include <signal.h> | |
#include <sys/socket.h> | |
#include <netinet/in.h> | |
#include <stdlib.h> | |
// Array of childen's PIDs. | |
pid_t children[10]; |
NewerOlder