Skip to content

Instantly share code, notes, and snippets.

@jwmcgettigan
jwmcgettigan / bitwarden_duplicate_cleaner.py
Last active May 6, 2025 11:56
Identifies and removes duplicate 'items' and 'folders' from your Bitwarden vault. 🎃
#!/usr/bin/env python3
# Copyright © 2023 Justin McGettigan
# Permission is hereby granted, free of charge, to any person obtaining a copy of this software
# and associated documentation files (the “Software”), to deal in the Software without
# restriction, including without limitation the rights to use, copy, modify, merge, publish,
# distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the
# Software is furnished to do so, subject to the following conditions:
#
# The above copyright notice and this permission notice shall be included in all copies or
@danpawlik
danpawlik / clean-up-xiaomi-bloatware.sh
Last active April 12, 2025 14:10 — forked from davydes/clean-up-xiaomi-bloatware.sh
Cleanup apps installed in MIUI
#!/bin/sh
#
# Clean-up Xiaomi smartphone without rooting:
#
# 1) You have to install adb tool from android sdk
# 2) You have to activate developer options, next activate usb debugging
# 3) Comment out or delete lines with packages, if you really need them
# 4) Optional: I hightly recommed to activate OEM unlocking feature in developer options.
# It doesn't unlock you device immediately, but in case of breaking you phone
# you will have opportunity to unlock you phone and reflash it via MiFlash.
@spidgorny
spidgorny / TailLog.php
Created July 9, 2021 19:27
Display only the last error from the Laravel log file and simplify output so that it fits the single screen output. Like "tail -f storage/logs/laravel.log", but smart
<?php
namespace App\Console\Commands;
use Illuminate\Console\Command;
use Illuminate\Support\Facades\Storage;
class TailLog extends Command
{
/**
@janisblaus
janisblaus / gist:fd13210dc2d61bf53e432010ce37c329
Created February 25, 2021 20:25
Fix Grub ♥ on OVH nvme disks, software RAID | Centos
mount /dev/md2 /mnt
mount /dev/nvme0n1p1 /mnt/boot/efi
mount --bind /dev /mnt/dev
mount --bind /proc /mnt/proc
mount --bind /sys /mnt/sys
chroot /mnt
grub2-mkconfig -o /boot/grub2/grub.cfg
grub2-mkconfig -o /boot/efi/EFI/centos/grub.cfg
@s3rj1k
s3rj1k / HowTo
Last active May 4, 2025 21:37
Ubuntu 20.04.3 AutoInstall
# For recent versions of Ubuntu:
- https://www.pugetsystems.com/labs/hpc/ubuntu-22-04-server-autoinstall-iso/
# Docs:
- https://wiki.ubuntu.com/FoundationsTeam/AutomatedServerInstalls
- https://wiki.ubuntu.com/FoundationsTeam/AutomatedServerInstalls/ConfigReference
- https://cloudinit.readthedocs.io/en/latest/topics/datasources/nocloud.html
- https://discourse.ubuntu.com/t/please-test-autoinstalls-for-20-04/15250/53
# Download ISO Installer:
@Braunson
Braunson / pivot-tables.md
Last active May 15, 2024 08:12
Laravel 8.x - Diving into Pivot Tables

Laravel 6 - Diving Into Pivot Tables

Pivot tables can be confusing and a little hard to wrap your head around at first. In this quick article we are going to dive into what a pivot table is, how to create one and finally how to use the pivot table. Let's dive in!

What is a pivot table?

A pivot table is used to connect relationships between two tables. Laravel provides a Many To Many relationship where you can use a pivot table.

@kfsone
kfsone / zeroconfdump.py
Created January 27, 2019 06:18
Dumps a list of all zeroconf devices on the network
#! /usr/bin/env python
# requires zeroconf (e.g. pip install --user zeroconf)
from collections import defaultdict
from time import sleep
from zeroconf import Zeroconf, ServiceBrowser, ZeroconfServiceTypes
from json import dumps
verbose = False
@fnky
fnky / ANSI.md
Last active May 12, 2025 15:19
ANSI Escape Codes

ANSI Escape Sequences

Standard escape codes are prefixed with Escape:

  • Ctrl-Key: ^[
  • Octal: \033
  • Unicode: \u001b
  • Hexadecimal: \x1B
  • Decimal: 27
@cecilemuller
cecilemuller / 2019-https-localhost.md
Last active April 30, 2025 12:33
How to create an HTTPS certificate for localhost domains

How to create an HTTPS certificate for localhost domains

This focuses on generating the certificates for loading local virtual hosts hosted on your computer, for development only.

Do not use self-signed certificates in production ! For online certificates, use Let's Encrypt instead (tutorial).

@tidus2102
tidus2102 / gist:d752910155ba77e7ff56f375122de73e
Created November 10, 2017 09:52
CentOS 7 PHP Deployment
0.
yum -y install epel-release yum-utils
rpm -Uvh http://rpms.famillecollet.com/enterprise/remi-release-7.rpm
yum-config-manager --enable remi
yum-config-manager --enable remi-php71
yum clean all
yum -y update
nano /etc/selinux/config