Skip to content

Instantly share code, notes, and snippets.

View xPaw's full-sized avatar

Pavel Djundik xPaw

View GitHub Profile
<?php
declare(strict_types=1);
// path to where svg folder from twemoji repository lies
// https://github.com/twitter/twemoji/tree/master/assets/svg
$input = __DIR__ . DIRECTORY_SEPARATOR . 'svg' . DIRECTORY_SEPARATOR;
$output = __DIR__ . DIRECTORY_SEPARATOR . 'flags' . DIRECTORY_SEPARATOR;
if( !file_exists( $input ) )
{
( function()
{
const darkMode = document.getElementById( 'dark-mode-toggle' );
if( darkMode )
{
const isDarkSchemePreferred = () => window.matchMedia && window.matchMedia( '(prefers-color-scheme: dark)' ).matches;
darkMode.addEventListener( 'click', function( e )
{
// ==UserScript==
// @name Grand Prix Chart
// @namespace me.xpaw.grandprixchart
// @version 0.6
// @match https://store.steampowered.com/grandprix*
// @grant GM_xmlhttpRequest
// @grant unsafeWindow
// @require https://cdnjs.cloudflare.com/ajax/libs/highcharts/7.1.2/highstock.js
// @run-at document-end
// ==/UserScript==
if( $args.Length -lt 1 )
{
"Pass in appids as arguments: 440 570 730"
Exit 1
}
foreach( $AppID in $args )
{
# Parse appids from links
$AppID = $AppID -creplace '.*?/([0-9]+).*', '$1'
@xPaw
xPaw / localhost_cert.sh
Last active March 7, 2026 23:48
Localhost certificate
#!/bin/bash
openssl ecparam -name prime256v1 -genkey -out localhost.key
openssl req -new -x509 -days 7300 -out localhost.crt -key localhost.key \
-subj '/CN=localhost' -extensions EXT -config <( \
printf "[dn]\nCN=localhost\n[req]\ndistinguished_name = dn\n[EXT]\nsubjectAltName=DNS:localhost, DNS:*.localhost, IP:127.0.0.1, IP:::1\nkeyUsage=digitalSignature\nextendedKeyUsage=serverAuth")
openssl dhparam -out dhparam.pem 4096
<?php
/*
* Written by xPaw
*
* Refference used: http://www.gtaforums.com/index.php?showtopic=457357
*/
define( 'BR', '<br>' );
$WANTED_MONEY = (int)1000000;
@xPaw
xPaw / steam_quick_queue.user.js
Last active April 22, 2026 02:24
⚠ This script has been integrated into SteamDB browser extension!
// ==UserScript==
// @name Steam Queue Auto Discoverer
// @description Discover the Steam queue three times to get the sale cards
// @version 2.3.0
// @namespace https://gist.github.com/xPaw/73f8ae2031b4e528abf7
// @icon https://store.steampowered.com/favicon.ico
// @match https://store.steampowered.com/explore*
// @grant none
// ==/UserScript==
using System;
using System.Collections.Generic;
using System.Text.RegularExpressions;
using NetIrc2;
using NetIrc2.Events;
namespace WendySharp
{
public class SedBot
{
@xPaw
xPaw / github_whitespace_button.user.js
Last active March 8, 2026 00:10
Adds a button in GitHub UI to ignore whitespace changes in commits
// ==UserScript==
// @name Ignore whitespace button on GitHub
// @description Adds a button in GitHub UI to ignore whitespace changes in commits
// @author xPaw
// @namespace https://gist.github.com/xPaw/de6ee132a2e267ef6960
// @updateURL https://gist.github.com/xPaw/de6ee132a2e267ef6960/raw/github_whitespace_button.user.js
// @match https://github.com/*
// @version 1.6.1
// @run-at document-end
// @grant none
/**
* This was caught on November 21, 2014 and removed shortly after.
*
* Source commit: https://github.com/SteamDatabase/SteamTracking/commit/c81b7e75eb52806c0854efa34abe70d5a7fdd006
*/
function GrindIntoGoo( appid, contextid, itemid )
{
var rgAJAXParams = {
sessionid: g_sessionID,