Skip to content

Instantly share code, notes, and snippets.

@umer936
umer936 / specs.sh
Created February 25, 2026 23:05
Quick_Specs
#!/bin/bash
echo "=== CPU ==="
lscpu | egrep 'Model name|CPU\(s\)|Thread|Core|Socket|Virtualization'
echo -e "\n=== MEMORY ==="
free -h
sudo dmidecode -t memory | egrep -i 'Size|Speed' | grep -v "No Module Installed"
echo -e "\n=== STORAGE ==="
lsblk -o NAME,SIZE,TYPE,MOUNTPOINT
@umer936
umer936 / ProxmoxRemoveSubNotification.sh
Last active February 25, 2026 22:51
Proxmox Remove Sub Notification
vim /usr/share/javascript/proxmox-widget-toolkit/proxmoxlib.js
line 470
@umer936
umer936 / HTMLtoPHPWord.php
Created May 19, 2025 17:13
HTML to PHPWord
<?php
declare(strict_types=1);
/**
* Writes a Word document of abstracts
*
* @param string $path The path to the Word document
* @param int|null $conference_id
* @return bool Whether the write was successful
* @throws \PhpOffice\PhpWord\Exception\Exception
<?php
declare(strict_types=1);
use Phinx\Migration\AbstractMigration;
const logActions = false;
class UpdateUserIds extends AbstractMigration
{
@umer936
umer936 / delete_dups.ps
Created August 28, 2023 23:42
Powershell empty/duplicate finder/remover
ls *.* -recurse | get-filehash | group -property hash | where { $_.count -gt 1 } | % { $_.group | select -skip 1 } | del
# https://n3wjack.net/2015/04/06/find-and-delete-duplicate-files-with-just-powershell/
@umer936
umer936 / fetch_wrapper.js
Last active May 22, 2023 16:30 — forked from Billcountry/LICENSE.md
A wrapper for fetch that takes jQuery ajax type setup
/**
* @umer936, umer936/ajaxFetchWrapper.js
* https://gist.github.com/umer936/c6bdbd80b8620dea5dfe7eac5e57b000
* modified from: Billcountry/fetch_wrapper.js
*
* @param options Object of options:
{
beforeSend (function): null,
url (string): "",
type (string): if data => "POST", otherwise "GET",
@umer936
umer936 / screen-rotation.sh
Created February 4, 2019 03:46
Grab accelerometer data from laptop
#! /bin/bash
/usr/bin/cat /sys/bus/iio/devices/iio\:device3/in_accel_x_raw
@umer936
umer936 / main.js
Last active July 13, 2020 15:42
Javascript bookmarklet to strip tracking tags in URLs for better bookmarking
javascript: void
function() {
var url = location.search;
if (url) {
var each = url.slice(1).split("&");
console.log("Stripping query parameters:", each);
var leave = each.filter(function(url) {
return "utm_" !== url.substr(0, 4) &&
"mc_" !== url.substr(0, 3) &&
"ct" !== url.substr(0, 2) &&
@umer936
umer936 / timesync.bat
Created February 11, 2018 07:15
Windows/Linux Synctime
@echo off && net start w32time && w32tm /resync /nowait && C:\Windows\System32\w32tm.exe /resync && net start w32time && w32tm /resync /nowait && C:\Windows\System32\w32tm.exe /resync
@umer936
umer936 / User-Package Control.sublime-settings
Last active October 12, 2017 04:54
Sublime Package Control Feb 10, 2016
{
"bootstrapped": true,
"in_process_packages":
[
],
"installed_packages":
[
"All Autocomplete",
"AutoFileName",
"Better CoffeeScript",