a game about onion boy
onion boy is an onion with arms and legs with a huge nose
his goal is to find eyes so he can happily cry because of himself
(function($) { | |
$.fn.gradientMe = function(opacity) { | |
if (typeof opacity == 'undefined') | |
opacity = 0.2; | |
if (typeof ColorThief != 'function') { | |
console.log('gradientMe(): ColorThief.js is missing!'); | |
return; |
<?php | |
function zipAndDownload($zipName, $contents) { | |
$archive = new ZipArchive(); | |
touch($zipName); | |
if ($archive->open($zipName, ZIPARCHIVE::OVERWRITE) !== true) | |
return; |
<?php | |
$urlBeginning = (!empty($_SERVER['HTTPS']) && $_SERVER['HTTPS'] != 'off' ? 'https' : 'http') . '://'; | |
$url = $urlBeginning . $_SERVER['HTTP_HOST'] . '/'; |
// in case this file gets loaded, it sets the variable to false | |
adBlocked = false; |
var i, timer; | |
if !is_array(timers) | |
return false; | |
for (i = 0; i < array_height_2d(timers); i++) { | |
if timers[i, 0] == -1 | |
continue; |
<!-- Contents can't be accessed (might be good for pdf stuff) --> | |
<object data="abc.pdf" type="application/pdf"> | |
<!-- Alternative content when Object can't be loaded (coz of older browsers): HTML5 <embed>, contents can be manipulated --> | |
<embed src="abc.pdf" type="application/pdf" /> | |
</object> |
# https://godotengine.org/qa/485/how-to-center-game-window | |
var screen_size = OS.get_screen_size() | |
var window_size = OS.get_window_size() | |
func _ready(): | |
OS.set_window_position(screen_size * .5 - window_size * .5) |
<?php | |
class AssocArrayToXmlParser | |
{ | |
private $assocArray; | |
private $xmlVersion = '1.0'; | |
private $encoding = 'utf-8'; | |
function __construct(array $_assocArray = null) | |
{ |
<!-- | |
Warning: simplified, check out | |
https://www.kathirvel.com/adding-file-uploads-to-magento-admin-system-configuration/ | |
--> | |
<config> | |
<sections> | |
<TAB_NAME> | |
<groups> | |
<GROUP_NAME> | |
<fields> |