Skip to content

Instantly share code, notes, and snippets.

#!/bin/bash
currentDirectory=$(dirname "$PWD/$0")
cd $currentDirectory/roms/snes
$currentDirectory/scraper \
-output_file="$currentDirectory/emulationstation/gamelists/snes/gamelist.xml" \
-rom_path="/recalbox/share/roms/snes" \
-download_images=true \
core_options_path = /recalbox/configs/retroarch/cores/retroarch-core-options.cfg
system_directory = /recalbox/share/bios/
config_save_on_exit = false
video_threaded = true
#aspect_ratio_index = "21"
video_aspect_ratio_auto = true
processor : 0
model name : ARMv7 Processor rev 5 (v7l)
BogoMIPS : 57.60
Features : half thumb fastmult vfp edsp neon vfpv3 tls vfpv4 idiva idivt vfpd32 lpae evtstrm
CPU implementer : 0x41
CPU architecture: 7
CPU variant : 0x0
CPU part : 0xc07
CPU revision : 5
#!/bin/bash
snapshotDir=/path/to/backup/dir
if [ -d $snapshotDir/daily.2 ]
then
rm -rf $snapshotDir/daily.2
fi
if [ -d $snapshotDir/daily.1 ]
#!/bin/bash
source=myLogin@hostname:
snapshotDir=/path/to/backup/dir
if [ -d $snapshotDir/hourly.3 ]
then
rm -rf $snapshotDir/hourly.3
fi
$image = file_get_contents('/path/to/file');
$base64 = base64_encode($image);
echo 'data:image/png;base64,'.$base64."\n";
<?php
// Get parameters
$arguments = $_SERVER['argv'];
array_shift($arguments);
if (empty($arguments)) {
die("File path is undefined\n");
}
$filePath = array_shift($arguments);
if (!is_file($filePath)) {
die("File not found : $filePath\n");
@neolao
neolao / gist:983196
Created May 20, 2011 15:45
Read only property
public function __get($name)
{
if (method_exists($this, "get_$name")) {
return $this->{"get_$name"}();
} else if (method_exists($this, "set_$name")) {
throw new Exception("Writeonly property $name");
} else {
throw new Exception("Undefined property $name");
}
}
/* Here we go, show the magazine */
$('#viewer').booklet({
width: bookWidth * 2,
height: bookHeight,
speed: 750,
pagePadding: 0,
pageNumbers: false,
closed: true,
autoCenter: true,
@neolao
neolao / robot.js
Created December 6, 2012 17:08
neolao
//FightCode can only understand your robot
//if its class is called Robot
var Robot = function(robot) {
this.mainInstance;
this.enemyFound = false;
setInterval(this.move, 1000);
};
Robot.prototype.move = function() {