Skip to content

Instantly share code, notes, and snippets.

Avatar
💭
🛩 Running your application

Viktor Szépe szepeviktor

💭
🛩 Running your application
View GitHub Profile
@szepeviktor
szepeviktor / research-scanner.js
Created Sep 19, 2021
research-scanner.com IP addresses
View research-scanner.js
// https://www.shodan.io/search?query=hostname%3Aresearch-scanner.com
var list=[]; document.querySelectorAll(".l-search-results .result .heading .title").forEach(function (item) {list.push(item.textContent.trim());}); console.info(list.join("\n"));
// https://www.greynoise.io/viz/query/?gnql=metadata.rdns%3Aresearch-scanner.com
var list=[]; document.querySelectorAll(".query-results .ip-wrapper div > p:first-child > label.ml-2").forEach(function (item) {list.push(item.nextSibling.textContent.trim());}); console.info(list.join("\n"));
@szepeviktor
szepeviktor / openpgpkey-wkd-apache.conf
Created Sep 12, 2021
Protonmail WKD bot sends a non-Mozilla user agent string
View openpgpkey-wkd-apache.conf
# Protonmail WKD bot
RewriteRule "^/\.well-known/openpgpkey/policy$" - [R=404,L]
@szepeviktor
szepeviktor / twitch-mirror.css
Created Sep 2, 2021
Mirror (flip) horizontally Twitch stream's video
View twitch-mirror.css
.video-player video { transform: rotateY(180deg); }
@szepeviktor
szepeviktor / facebook-dc.md
Last active Aug 26, 2021
Facebook Data Center locations
View facebook-dc.md

To get the locations of PTR record in AS32934, e.g. in 31.13.96.0/19 fwdproxy-cln-013.fbsv.net.

DNS PTR record City
prn Prineville, OR, USA
. Papillion, NE, USA
. Los Lunas, NM, USA
ftw Fort Worth, TX, USA
frc Forest City, NC, USA
atn Altoona, IA, USA
@szepeviktor
szepeviktor / wordpress-enqueue-constants.php
Created Jun 18, 2021
Informative constants for WordPress wp_enqueue_script() and wp_enqueue_style()
View wordpress-enqueue-constants.php
<?php
namespace WordPress\Enqueue;
// wp_enqueue_script( $handle, $src = '', $deps = array(), $ver = false, $in_footer = false )
const DEPS_EMPTY = [];
const VER_CORE = false;
const VER_EMPTY = null;
const IN_HEADER = false;
const IN_FOOTER = true;
@szepeviktor
szepeviktor / url.php
Last active Apr 5, 2021
Display parsed URL.
View url.php
#!/usr/bin/php
<?php
/**
* Display parsed URL.
*/
// Print the first command line arguments parsed.
(new URL($argv[1]))->print();
class URL
@szepeviktor
szepeviktor / sodium-constants.php
Created Feb 23, 2021
Display all PHP Sodium constants
View sodium-constants.php
<?php
foreach(get_defined_constants() as $name => $value) {
if (substr($name, 0, 7) !== 'SODIUM_') continue;
printf('%s = %s%s', $name, $value, "\n");
}
@szepeviktor
szepeviktor / EmptyStringGenerator.php
Created Feb 7, 2021
Empty String Generator v1.0.0
View EmptyStringGenerator.php
<?php
namespace DoNot\Ever\DoThis;
final class EmptyStringGenerator
{
protected const EMPTY_STRING = '';
protected string $string;
@szepeviktor
szepeviktor / kifli-nagy-kepek.js
Last active Mar 3, 2021
KIFLI.hu termékkép nagyító - 🇬🇧 Enlarge ROHLIK.cz product images
View kifli-nagy-kepek.js
// ==UserScript==
// @name Kifli nagy képek
// @version 0.1.0
// @icon https://www.kifli.hu/favicon/hu/favicon.ico
// @run-at document-idle
// @grant none
// @include https://www.kifli.hu/*
// @include https://kifli.hu/*
// @include https://www.rohlik.cz/*
// ==/UserScript==
@szepeviktor
szepeviktor / Web-Application-Start.md
Last active Jan 18, 2021
Start a Web Application with a clean slate
View Web-Application-Start.md

Start making a Web Application with a clean slate

Define a clean vision. Make sure it is valid.