Status: Active/relevant
Importance: BLOCKER
Reported to developer: Yes
Date reported: 20.09.2017
Date solved: N/A
Hotfix available: Yes
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
var exec = require('exec'); | |
var colors = require('colors'); | |
function fixDevice() { | |
console.log(colors.red('Usb device error... Resetting...')); | |
exec('sudo /home/pi/work/usbreset /dev/bus/usb/001/005', function(err, out, code) { | |
console.log(colors.blue('Usb device error... Resetting...')); | |
setTimeout(updatepic, 3000); | |
}); |
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 | |
//Create web link | |
$linkPrefix = (APP_ENVIRONMENT == APP_ENVIRONMENT_PROD ? 'https://' : 'http://'); | |
define('APP_WWW_PATH', $linkPrefix . $_SERVER['HTTP_HOST'] . dirname($_SERVER['SCRIPT_NAME'])); | |
?> |
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 InFields { | |
/** | |
* Fetches value from POST. | |
* $fields array with post fields to be fetched | |
* $strict if strict mode is enabled, the fields will be required (if not, they will be added, but have null as value) | |
* $stringFilter if the stringFilter is enabled, the variables are ran through filter_var with FILTER_SANITIZE_STRING | |
* |
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 BasePathGenerator { | |
private static $isSet = false; | |
private static $foundBasePath = null; | |
public static function get() { | |
if (self::$isSet) return self::$foundBasePath; | |
if (!isset($_SERVER['REQUEST_URI'])) return false; | |
$jumps = explode('/', $_SERVER['REQUEST_URI']); | |
$c = count($jumps); | |
$c--; //Remove first element |
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 BasePathGenerator { | |
private static $isSet = false; | |
private static $foundBasePath = null; | |
public static function get() { | |
if (self::$isSet) return self::$foundBasePath; | |
if (!isset($_SERVER['REQUEST_URI'])) return false; | |
$jumps = explode('/', $_SERVER['REQUEST_URI']); | |
$c = count($jumps); | |
$c--; //Remove first element |
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
const fs = require('fs'); | |
const he = require('he'); | |
const raw = fs.readFileSync('input.txt').toString(); | |
// Construct a downloadable link from the email contents | |
const lines = raw.split('=\r\n'); | |
const data = lines.join(''); | |
let link = data.split('<li>Link: ')[1].split('</li>')[0]; |
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
// Command: | |
/price <itemname|itemid> | |
/stackprice <itemname|itemid> | |
// Example | |
/price flask of titans | |
/stackprice dreamfoil |
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
// Syntax | |
/craftprice <itemname|itemid> | |
// Examples | |
/craftprice Major Mana Potion | |
/craftprice Brilliant Wizard Oil |
OlderNewer