Skip to content

Instantly share code, notes, and snippets.

💭
🛩 Running your application

Viktor Szépe szepeviktor

💭
🛩 Running your application
Block or report user

Report or block szepeviktor

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View Dockerfile
#
# szepeviktor/python-s3ql-test
#
# BUILD :docker build -t szepeviktor/python-s3ql-test:stretch-0.3.0 .
# RUN :docker run --tty --rm --cap-add SYS_ADMIN --device /dev/fuse szepeviktor/python-s3ql-test:stretch-0.3.0
FROM python:3.6-stretch
# Dependencies
RUN set -e -x \
@szepeviktor
szepeviktor / phpcs.xml
Last active Dec 5, 2019
Gergő goes Laravel. Usage: vendor/bin/phpcs src/
View phpcs.xml
<?xml version="1.0"?>
<ruleset name="ReturnTagRule">
<description>Gergő goes Laravel.</description>
<rule ref="Squiz.Commenting.FunctionComment.MissingReturn" />
</ruleset>
View php-env-check.php
<?php
/**
* Check PHP environment
*
* Usage through a webserver
* wget -q -O - "https://example.com/php-env-check.php"; echo
* Usage on CLI
* php /path/to/php-env-check.php
*
* @package php-env-check
@szepeviktor
szepeviktor / _core-wpdb.php
Last active Nov 27, 2019
Connect to WordPress's global $wpdb instance from a class -> has a new home: https://github.com/szepeviktor/Toolkit4WP/blob/master/src/Db.php
View _core-wpdb.php
<?php
/**
* This is a gift for Phil.
*
* Usage: $db = new \WordPress\WpDb(); $db->prepare('...');
*/
declare( strict_types = 1 );
namespace WordPress;
View tag-factory.php
<?php declare( strict_types = 1 );
/**
* Create an HTML element.
*
* @see https://www.w3.org/TR/html/syntax.html#void-elements
*
* @param string $name Tag name.
* @param array $attrs HTML attributes.
* @param string|\Traversable $content Raw HTML content.
@szepeviktor
szepeviktor / callables-in-wordpress.php
Last active Nov 17, 2019
Different callables in WordPress hooks.
View callables-in-wordpress.php
<?php
/**
* Different callables in WordPress hooks.
*
* @see https://www.php.net/manual/en/language.types.callable.php
*/
function callableFunction() { echo "I'm the callableFunction.\n"; }
class callableObject
@szepeviktor
szepeviktor / il-treno-fix-lightbox.js
Created Oct 27, 2019
Kategória kinyitás után is legyen lightbox a www.iltreno.hu honlapon
View il-treno-fix-lightbox.js
$(".katsor").one("DOMSubtreeModified", "div:first", function (event) { $(event.target).find("a.etel-gallery").colorbox(); });
View netpincer-nem-kedvelem.js
// ==UserScript==
// @name Netpincér NEM kedvelem gomb
// @description Az étterem lista oldalakon megjelenít egy új gombot.
// @icon https://www.netpincer.hu/skin/flat/images/favicon.ico
// @version 0.1.2
// @grant none
// @require https://ajax.aspnetcdn.com/ajax/jQuery/jquery-3.4.1.min.js
// @run-at document-idle
// @include https://www.netpincer.hu/hazhozszallitas/budapest*
// @include https://www.netpincer.hu/budapest*/hazhozszallitas
@szepeviktor
szepeviktor / gd-supported-image-formats.php
Created Oct 22, 2019
Is image format supported by GD PHP extension?
View gd-supported-image-formats.php
<?php
/**
* Is image format supported??
*
* @see https://www.php.net/manual/en/function.exif-imagetype.php
* @see https://www.php.net/manual/en/function.gd-info.php
*
* @param string File path.
* @return bool
*/
View www.gstatic.com--wcm--impl-1_31.js
(function () {
var l = this,
n = function (a) {
return "string" == typeof a
},
aa = function (a, b) {
a = a.split(".");
var c = l;
a[0] in c || "undefined" == typeof c.execScript || c.execScript("var " + a[0]);
for (var d; a.length && (d = a.shift());) a.length || void 0 === b ? c[d] && c[d] !== Object.prototype[d] ? c = c[d] : c = c[d] = {} : c[d] = b
You can’t perform that action at this time.