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>
@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 Google_Search.html
<!DOCTYPE html>
<html lang="en-HU">
<head>
<meta charset="UTF-8">
<meta content="origin" name="referrer">
<meta content="/images/branding/googleg/1x/googleg_standard_color_128dp.png" itemprop="image">
<title>Aberdeen - Google Search</title>
<script nonce="xLFagHCGUOwQTz0XCmcVRQ==">
(function(){var a=window.performance;window.start=(new Date).getTime();a:{var b=window;if(a){var c=a.timing;if(c){var d=c.navigationStart,e=c.responseStart;if(e>d&&e<=window.start){window.start=e;b.wsrt=e-d;break a}}a.now&&(b.wsrt=Math.floor(a.now()))}}window.google=window.google||{};google.aft=function(f){f.setAttribute("data-iml",+new Date)};}).call(this);(function(){window.jsarwt=function(){return!1};}).call(this);(function(){var gbvu='/search?q\x3dAberdeen\x26gbv\x3d2\x26sei\x3dBQ1-XYTfMLCorgTKoJbwCQ';(function(){var e=function(c,a){this.a=c===b&&a||"";this.g=d};e.prototype.i=!0;e.prototype.h=function(){return this.a.toString()};var f=/^(?:(?:https?|mailto|ftp):|[^:/?#]*(?:[/?#]|$))/i,d={},b={};var g,h="
@szepeviktor
szepeviktor / netpincer-older.js
Last active Jul 1, 2019
Régi éttermeket előre a Netpincér-en!
View netpincer-older.js
// Sorba rendezi az éttermeket.
var restaurants = jQuery(".shop-list-content:first > li");
restaurants.sort(function (a, b) {
var a_year = jQuery(a).find(".cuisines:contains('éve')").text().trim().padStart(3, "0").replace(/^([0-9]+)\b.*/, '$1');
var b_year = jQuery(b).find(".cuisines:contains('éve')").text().trim().padStart(3, "0").replace(/^([0-9]+)\b.*/, '$1');
if (a_year === b_year) return 0;
// Older first
return (parseInt(a_year) > parseInt(b_year)) ? -1 : 1;
@szepeviktor
szepeviktor / phpstan-output.txt
Created Jun 9, 2019
Analysis results of cipherdevgroup/alpha on PHPStan Level 4
View phpstan-output.txt
------ -----------------------------------
Line hooks-template.php
------ -----------------------------------
11 Right side of || is always false.
------ -----------------------------------
------ -----------------------------------
Line hooks.php
------ -----------------------------------
11 Right side of || is always false.
@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;
You can’t perform that action at this time.