Skip to content

Instantly share code, notes, and snippets.

View VottusCode's full-sized avatar
💭
enjoying corona, hbu

VottusCode

💭
enjoying corona, hbu
View GitHub Profile
@VottusCode
VottusCode / rebuild_dkms_modules.sh
Created March 16, 2022 11:50
Rebuild DKMS modules for all kernel versions
ls /var/lib/initramfs-tools | \
sudo xargs -n1 /usr/lib/dkms/dkms_autoinstaller start
@VottusCode
VottusCode / bump-deps-major.js
Last active October 8, 2022 10:45
Small JS script to bump all Yarn dependencies to the latest version available. Supports Yarn workspaces.
const { exec } = require('child_process')
const path = require('path')
const glob = require('glob').sync
const bumpDeps = async (depsList, dev = false, workspace) => {
await new Promise((resolve, reject) => {
const _workspace = workspace ? `workspace ${workspace}` : '-W'
const _devFlag = dev ? '-D' : ''
const cmd = `yarn ${_workspace} add ${_devFlag} ${Object.keys(depsList).join(' ')}`
@VottusCode
VottusCode / index.js
Created October 20, 2022 08:26
Vodafone AR2SINEW Restart script
const VodafoneUrl = "http://192.168.0.1";
const Username = "admin";
const Password = "password";
const {
fill,
createBrowser,
elementExists,
waitAndClick,
} = require("./puppeteer");
@VottusCode
VottusCode / TemplateHelper.php
Created December 2, 2022 22:33
Extended template resolution with themes
<?php declare(strict_types=1);
namespace App\Templating;
use Nette\Application\UI\Presenter;
use Nette\Utils\FileSystem;
class TemplateHelper
{
@VottusCode
VottusCode / link_binaries.sh
Created April 3, 2022 10:40
Link binaries one-liner (example on jdk/bin)
@VottusCode
VottusCode / i_hate_myself_too_dw.php
Created March 22, 2023 12:48
wip random bullshit
<?php declare(strict_types=1);
ini_set('auto_detect_line_endings', true);
// Utility code
interface Processor
{
/**
* @param resource|string $source
*/
@VottusCode
VottusCode / app-Facades-Hash.php
Last active July 1, 2023 18:13
Simple implementation of AuthMe SHA256 as a Laravel Facade.
<?php declare(strict_types=1);
namespace App\Facades;
use Illuminate\Contracts\Hashing\Hasher;
use Illuminate\Support\Facades\Facade;
use Illuminate\Support\Str;
/**
* Hasher implementation that supports