Skip to content

Instantly share code, notes, and snippets.

View kduma's full-sized avatar

Krystian Duma kduma

View GitHub Profile
@thepwrtank18
thepwrtank18 / keys.md
Last active May 4, 2026 03:34
[deprecated] Windows XP/2003 Product Keys
@sgrodzicki
sgrodzicki / unifi_device_models.json
Last active December 30, 2025 19:01
UniFi device models
{
"BZ2": {
"name": "UAP",
"names": {
"abbreviation": "UAP",
"fullName": "Access Point",
"sku": "UAP"
},
"type": "uap",
"compliance": {
@isatufan
isatufan / ZPLHandler.cs
Last active February 26, 2025 03:53
Scales a raw ZPL file from 203 dpi (dots per inch) to 300 dpi. C#.NET edition
/*
* author: Tres Finocchiaro, updated by Alethea Rose, translated from JavaScript to C#.NET by İsa Tufan Tunçbilek.
* date: 2015-05-22, 2017-07-10, 2020-04-18
* license: Public Domain; Use as you wish.
* source: http://qz.io
* https://gist.github.com/alethea/3e409b0b1206099bee88eefac7fa7cbd
*/
using System;
using System.Collections.Generic;
@dac514
dac514 / EventEmitter.php
Last active July 22, 2025 01:42
Refactor Your Slow Form Using PHP Generators and Event Streams
<?php
/**
* @license GPLv3 (or any later version)
* @see http://kizu514.com/blog/refactor-your-slow-form-using-php-generators-and-event-streams/
*/
namespace KIZU514;
class EventEmitter
{
@zanechua
zanechua / azure-pipelines.yml
Last active September 23, 2024 09:41
Azure Pipeline + Laravel + MySQL + PHPUnit + Laravel Dusk
# PHP
# Test and package your PHP project.
# Add steps that run tests, save build artifacts, deploy, and more:
# https://docs.microsoft.com/azure/devops/pipelines/languages/php
pool:
vmImage: 'Ubuntu 16.04'
variables:
phpVersion: 7.2
@daftspunk
daftspunk / HdWallet.php
Created April 14, 2018 02:27
PHP library for generating addresses from an XPUB
<?php
use BitWasp\Bitcoin\Bitcoin;
use BitWasp\Bitcoin\Key\Deterministic\HierarchicalKeyFactory;
use BitWasp\Bitcoin\Key\Deterministic\HierarchicalKeySequence;
use BitWasp\Bitcoin\Key\Deterministic\MultisigHD;
use BitWasp\Bitcoin\Network\NetworkFactory;
use Exception;
/*
@davidpiesse
davidpiesse / Schedulable.php
Last active October 15, 2025 21:28
Laravel Custom Class/Model Scheduling
<?php
//Don't forget to change the namespace!
namespace App\Traits;
use Cron\CronExpression;
use Illuminate\Support\Carbon;
use Illuminate\Console\Scheduling\ManagesFrequencies;
trait Schedulable{
@alethea
alethea / scale-zpl.js
Last active February 26, 2025 03:53 — forked from tresf/scale-zpl.js
(Experimental) Scales a Raw ZPL file from 203 DPI (dots per inch) to 300 DPI
/*
* author: Tres Finocchiaro, updated by Alethea Rose
* date: 2017-07-10
* license: Public Domain; Use as you wish.
* source: http://qz.io
*/
const cmds = {
FO: 2,
PW: null,
<?php
/**
* Automatically alias Laravel Model's to their base classname.
* Ex: "App\Models\User" now can just be accessed by "User"
*/
if (! function_exists('aliasModels')) {
function aliasModels() {
$finder = new \Symfony\Component\Finder\Finder();
$finder->files()->name('*.php')->in(base_path().'/app');
@lyubenov
lyubenov / itebooks.py
Last active January 3, 2024 22:01
Removes it-ebooks.info links from book's footers. Run python itebooks.py -f /sourcepath/books/thebook.pdf to cleanup your thebook.pdf file.
#!/usr/bin/env python3
import sys
import re
import shutil
import argparse
import binascii
pattern = b'''0a2f54797065202f416e6e6f740a2f53756274797065202f4c696e6b0a2f52656
374205b20.*?205d0a2f426f7264657220.*?\n0a2f41203c3c0a2f54797065202f416374696f6e