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
# fixing ExU Ingot Recipes when TCon, DragonAPI is installed | |
# Credits to PrincessRTFM | |
val stableSigil = <ExtraUtilities:divisionSigil>.onlyWithTag({stable: 1}); | |
val normalSigil = <ExtraUtilities:divisionSigil>; | |
val ironIngot = <minecraft:iron_ingot>; | |
val diamond = <minecraft:diamond>; | |
recipes.removeShaped(<ExtraUtilities:unstableingot>); # remove the bugged recipes | |
recipes.addShaped(<ExtraUtilities:unstableingot:2>,[[ironIngot],[stableSigil],[diamond]]); |
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
#!/bin/sh | |
_tmp="$( mktemp --tmpdir -- git-hub.XXXXXXXX )" | |
trap 'rm "$_tmp";' EXIT HUP INT ABRT TERM | |
curl -s "https://api.github.com/repos/$1" > "$_tmp" || exit 1 | |
jq . >> /dev/null < "$_tmp" || { | |
echo "Malformed JSON." | |
exit 1 |
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 | |
final class Repository | |
{ | |
public save(Entity $item) {} | |
public find($criteria): Entity {} | |
public __construct(PDO $db) {} | |
} | |
final class Entity |
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
__set_prompt() | |
{ | |
test "$PS_ORIG" || PS_ORIG="$PS1" | |
test "$PC_ORIG" || eval "PC_ORIG='$PROMPT_COMMAND'" | |
PROMPT_COMMAND=__bash_prompt | |
}; readonly -f __set_prompt | |
__bash_prompt() | |
{ | |
local ERRORLEVEL=$? | |
if [ $ERRORLEVEL != 0 ]; then |
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 | |
function get_new_image_name($dir, $id, $limit_num = PHP_INT_MAX) | |
{ | |
$cache = []; | |
foreach(glob($dir . sprintf('/%02u-*.*', $id), GLOB_MARK) as $name) | |
{ | |
if(is_dir($name)) | |
{ | |
continue; | |
} |
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
<?xml version="1.0" encoding='UTF-8'?> | |
<!DOCTYPE hrc PUBLIC | |
"-//Cail Lomecb//DTD Colorer HRC take5//EN" | |
"http://colorer.sf.net/2003/hrc.dtd" | |
> | |
<hrc version="take5" xmlns="http://colorer.sf.net/2003/hrc" | |
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | |
xsi:schemaLocation="http://colorer.sf.net/2003/hrc http://colorer.sf.net/2003/hrc.xsd" | |
> |
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 | |
require_once __DIR__.'/../vendor/autoload.php'; | |
$loop = React\EventLoop\Factory::create(); | |
$factory = new React\Datagram\Factory($loop); | |
function serverHandler(React\Datagram\Socket $server) { | |
$server->on('message', 'messageHandler'); |
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 | |
/** Universal stackable classloader. | |
* | |
* @version SVN: $Id: classloader.php 739 2018-03-03 19:05:12Z anrdaemon $ | |
*/ | |
namespace AnrDaemon; | |
return call_user_func(function(){ | |
$nsl = strlen(__NAMESPACE__); |
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 | |
$nf = new \NumberFormatter("ru_RU", \NumberFormatter::CURRENCY); | |
$cs = ini_get('default_charset'); | |
$formatter = function($price, $currency = 'RUB') | |
use($nf, $cs) | |
{ | |
return iconv('UTF-8', "$cs//IGNORE", $nf->formatCurrency($price, $currency)); | |
}; |
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 | |
/** Smarty template wrapper | |
* | |
* @version $Id: Smarty.php 674 2017-07-10 23:47:11Z anrdaemon $ | |
*/ | |
namespace AnrDaemon\CcWeb\Wrappers; | |
use | |
AnrDaemon\CcWeb\Interfaces; |
OlderNewer