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
select | |
count(0) AS `downloads`, | |
`d`.`timestamp` AS `timestamp`, | |
'Pack' AS `dltype`, | |
`p`.`size` AS `size`, | |
concat(`t`.`theme`,' #',`p`.`packnum`) AS `name`, | |
`p`.`beatmaps` AS `files`, | |
`p`.`downloads` AS `totaldownloads`, | |
concat_ws(';',`t`.`id`,`t`.`theme`,`p`.`packnum`) AS `linkdata` | |
from |
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
#!/usr/bin/perl -w | |
# | |
# splitmysqldump - split mysqldump file into per-database dump files. | |
use strict; | |
use warnings; | |
my $dbfile; | |
my $dbname = q{}; | |
my $header = q{}; | |
while (<>) { |
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 FormatHelper { | |
static public function niceSize($bytes, $digits = 2) { | |
$format = "%0.{$digits}f %s"; | |
$sizeObj = self::bytesHumnaized($bytes); | |
return sprintf($format, $sizeObj->value, $sizeObj->extension); | |
} | |
static public function bytesHumanized($bytes, $step = 1024) { |
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 | |
/** | |
* singleton pattern class | |
*/ | |
class Singleton { | |
public static function getInstance() { | |
static $instance; | |
if (static::$instance == null) { | |
static::$instance == new self(); | |
} |
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
body { | |
white-space: pre; | |
font-family: monospace; | |
background: #222; | |
color: #ccc; | |
} | |
.property { | |
font-weight: normal; | |
font-style: italic; |