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 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 Jun 22, 2019
Connect to WordPress's global $wpdb instance from a proper class, live version: https://github.com/szepeviktor/debian-server-tools/blob/master/webserver/wordpress/_core-wpdb.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 phpstan.out
$ phpstan analyze
Note: Using configuration file /home/viktor/tmp/silverstripe-framework/phpstan.neon.dist.
531/531 [▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓] 100%
------ ----------------------------------------------------------------------------------------------------------------------------------------
Line Control/Director.php
------ ----------------------------------------------------------------------------------------------------------------------------------------
71 Property SilverStripe\Control\Director::$current_page has unknown class SilverStripe\CMS\Model\SiteTree as its type.
411 Return typehint of method SilverStripe\Control\Director::get_current_page() has invalid type SilverStripe\CMS\Model\SiteTree.
@szepeviktor
szepeviktor / composer.json
Created May 19, 2019
Static Analysis for WebARX WordPress plugin: composer update --classmap-authoritative && vendor/bin/phpstan analyze
View composer.json
{
"require": {
"php": "~7.1"
},
"require-dev": {
"szepeviktor/phpstan-wordpress": "^0.1.0"
}
}
View harden-global-functions.md

Hello,

Here's a quick and dirty way to slip a backdoor into a PHP project by abusing Namespaces.

POC:

root@ssh:~/underhanded# php index.php SUCCESS

@szepeviktor
szepeviktor / wolt-vega.js
Last active Jun 24, 2019
Wolt vega - az étlap oldalakról eltávolítja a húsételeket - remove meat from the menu
View wolt-vega.js
// ==UserScript==
// @name Wolt vega
// @description Az étlap oldalakról eltávolítja a húsételeket.
// @icon https://static.wolt.com/favicon.ico
// @version 0.2.0
// @grant none
// @run-at document-idle
// @include https://wolt.com/*/*/*/restaurant/*
// ==/UserScript==
@szepeviktor
szepeviktor / tag-factory.php
Last active Oct 13, 2019
Tag factory for 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 / netpincer-vega.js
Last active Mar 3, 2019
Netpincér vega - Az étlap oldalakról eltávolítja a húsételeket.
View netpincer-vega.js
// ==UserScript==
// @name Netpincér vega
// @description Az étlap oldalakról eltávolítja a húsételeket.
// @icon https://www.netpincer.hu/skin/flat/images/favicon.ico
// @version 0.2.2
// @grant none
// @run-at document-idle
// @include https://www.netpincer.hu/*/_etlap
// @include https://www.netpincer.hu/*/etlap
// ==/UserScript==
You can’t perform that action at this time.