Skip to content

Instantly share code, notes, and snippets.

View bezhermoso's full-sized avatar

Bez Hermoso bezhermoso

View GitHub Profile
@saagarjha
saagarjha / imessage_cleanup.py
Created April 26, 2021 03:12
Helps clean up large iMessage attachments by letting you search for them
#!/usr/bin/env python3
import pathlib
import sqlite3
if __name__ == "__main__":
connection = sqlite3.connect(f"{pathlib.Path.home()}/Library/Messages/chat.db")
for (name, size, chat, date) in connection.execute("""
SELECT transfer_name, total_bytes, chat_message_join.chat_id, date
FROM message_attachment_join JOIN message ON message_attachment_join.message_id = message.ROWID
@gboudreau
gboudreau / AuthyToOtherAuthenticator.md
Last active July 23, 2024 19:15 — forked from Ingramz/AuthyToOtherAuthenticator.md
Export TOTP tokens from Authy
@kzap
kzap / showCommitsByAuthorDate.sh
Last active April 20, 2017 19:23
Show Git Commits Across All Branches By Dates in Reverse Order (By Author Date)
# show author date and grep matching dates
git log --pretty=format:"%C(yellow)%h%Creset%C(cyan)%C(bold)%d%Creset %C(cyan)(%cr|%ai)%Creset %C(green)%aE%Creset %s" \
--all --no-merges --reverse --author="Andre" | grep -E "2017-01-(0[1-9]|1[0-9]|2[0-9]|3[0-1])"
@yogsototh
yogsototh / Tuto.md
Last active May 30, 2023 12:07
Starting Emacs in GUI with shell environment variables correctly set

Problem

When starting Emacs.app on Mac, the Emacs doesn't have some environment variable set correctly. Typically it is terrible when you use GPG, pinentry-mac, gpg-agent But also a lot of different variables used to make git works correctly, etc...

Solution

  1. Create the file ~/bin/init-app-env.sh:
@kevin-smets
kevin-smets / 1_kubernetes_on_macOS.md
Last active May 5, 2024 10:12
Local Kubernetes setup on macOS with minikube on VirtualBox and local Docker registry

Requirements

Minikube requires that VT-x/AMD-v virtualization is enabled in BIOS. To check that this is enabled on OSX / macOS run:

sysctl -a | grep machdep.cpu.features | grep VMX

If there's output, you're good!

Prerequisites

@p3t3r67x0
p3t3r67x0 / openssl_commands.md
Last active May 22, 2024 02:19
Some list of openssl commands for check and verify your keys

openssl

Install

Install the OpenSSL on Debian based systems

sudo apt-get install openssl
@beanmoss
beanmoss / IDONTFUCKINGCARE bookmarklet
Last active July 17, 2017 13:53
pangchurva ng aldub, pastillas, otwol sa facebook!
javascript:(function()%7BMutationObserver%20%3D%20window.MutationObserver%20%7C%7C%20window.WebKitMutationObserver%3Bfilter%20%3D%20prompt(%22Dont%20want%20to%20see%20these%3A%22%2C%20%22aldub%7Cpastillas%7Cotwol%22)%3BiDontFuckingCare()%3Bvar%20observer%20%3D%20new%20MutationObserver(function%20(mutations%2C%20observer)%20%7BiDontFuckingCare()%3B%7D)%3Bobserver.observe(document%2C%20%7Bsubtree%3A%20true%2Cattributes%3A%20true%7D)%3Bfunction%20iDontFuckingCare()%20%7Bif%20(filter%20!%3D%20null)%20%7Bx%20%3D%20document.getElementsByClassName('fbUserContent')%3BregexFilter%20%3D%20new%20RegExp(filter%2C%20%22gi%22)%3Bfor%20(var%20i%20%3D%200%3B%20i%20%3C%20x.length%3B%20i%2B%2B)%20%7Bif%20(regexFilter.test(x%5Bi%5D.innerHTML))x%5Bi%5D.remove()%3B%7D%7D%7D%7D)()

OpenCart Issue #1286

This is the full version of the thread for opencart#1286, archived from notification emails.
The discussion has since been deleted almost entirely by OpenCart's developer.
Everyone who posted in it has also been blocked from the OpenCart repo.


Damian Bushong

@webmozart
webmozart / array-validation-error-mapping.php
Last active June 25, 2023 23:30
A little experiment: Validating (potentially multi-leveled) arrays with the Symfony2 Validator component and returning the errors in the same data structure as the validated array by using the Symfony2 PropertyAccess component.
<?php
use Symfony\Component\PropertyAccess\PropertyAccess;
use Symfony\Component\Validator\Constraints\All;
use Symfony\Component\Validator\Constraints\Choice;
use Symfony\Component\Validator\Constraints\Collection;
use Symfony\Component\Validator\Constraints\Length;
use Symfony\Component\Validator\Constraints\NotBlank;
use Symfony\Component\Validator\Constraints\Optional;
use Symfony\Component\Validator\Constraints\Required;