Skip to content

Instantly share code, notes, and snippets.

@zakkak
zakkak / .git-commit-template
Last active May 15, 2024 00:06 — forked from adeekshith/.git-commit-template.txt
This commit message template that helps you write great commit messages and enforce it across your team.
# [<tag>] (If applied, this commit will...) <subject> (Max 72 char)
# |<---- Preferably using up to 50 chars --->|<------------------->|
# Example:
# [feat] Implement automated commit messages
# (Optional) Explain why this change is being made
# |<---- Try To Limit Each Line to a Maximum Of 72 Characters ---->|
# (Optional) Provide links or keys to any relevant tickets, articles or other resources
# Example: Github issue #23
@0xdevalias
0xdevalias / _deobfuscating-unminifying-obfuscated-web-app-code.md
Last active May 15, 2024 00:04
Some notes and tools for reverse engineering / deobfuscating / unminifying obfuscated web app code
@hirbod
hirbod / withDisableForcedDarkModeAndroid.js
Last active May 15, 2024 00:00
Expo Config Plugin to disable forced Dark mode.
// disable forced dark mode to prevent weird color changes on
// certain android devices (Xiaomi MIUI and others enforcing dark mode with view analyzing)
// create a file like "plugins/withDisableForcedDarkModeAndroid.js". Insert this content and edit your app.config.js/app.json
/*
"expo": {
...
...
...
"plugins": [
@chrisroos
chrisroos / gpg-import-and-export-instructions.md
Created September 9, 2011 10:49
Instructions for exporting/importing (backup/restore) GPG keys

Every so often I have to restore my gpg keys and I'm never sure how best to do it. So, I've spent some time playing around with the various ways to export/import (backup/restore) keys.

Method 1

Backup the public and secret keyrings and trust database

cp ~/.gnupg/pubring.gpg /path/to/backups/
cp ~/.gnupg/secring.gpg /path/to/backups/
cp ~/.gnupg/trustdb.gpg /path/to/backups/

or, instead of backing up trustdb...

@SheldonWangRJT
SheldonWangRJT / Convert .mov or .MP4 to .gif.md
Last active May 14, 2024 23:52
Convert Movie(.mov) file to Gif(.gif) file in one command line in Mac Terminal

This notes is written by Sheldon. You can find me with #iOSBySheldon in Github, Youtube, Facebook, etc.

Need

Convert .mov/.MP4 to .gif

Reason

As a developer, I feel better to upload a short video when I create the pull request to show other viewers what I did in this PR. I tried .mov format directly got after finishing recording screen using Quicktime, however, gif offers preview in most web pages, and has smaller file size.

This is not limited to developer, anyone has this need can use this method to convert the files.

@ryancdavison
ryancdavison / iPad-Pro-Magic-Keyboard-Portrait-Mode-DIY-Smart-Connector-Cable.md
Last active May 14, 2024 23:46
iPad Pro 12.9 (2020) Magic Keyboard Portrait Mode DIY Smart Connector Cable

iPad Pro 12.9" (2020) Magic Keyboard Portrait Mode DIY Smart Connector Cable

I wanted my iPad Pro to be able to use the Magic Keyboard in portrait mode, but the current Smart Connector configuration does not allow this. With too much time on my hands, I made a short jumper cable using a section of USB cable, 5-pin POGO connectors (the 5-pin works using pins 1, 3, and 5, and removing pins 2 and 4), a small electrical project box, 3mm N52 magnets, and some epoxy and Sugru to pack everything into place. My cable and connections orientation had more to do with the boxes I found to encase the connector (with holes on the small end) than anything else. Obviously, there will be many ways to do this.

WARNING: Getting any of these steps wrong will probably ruin your iPad.

Note: These measurements are for the 12.9" (2020) model. The magnets did not line up and the polarity was different for my wife's iPad Pro 11" (2021).

![iPad-Pro-MmagicKeyboard-Jumper-Cable-min](https://user-images.githubusercontent.c

@LockedJCE
LockedJCE / regex-email-matching.md
Last active May 14, 2024 23:45
This is a tutorial on how regex works to validate an email.

Regex-Tutorial

Welcome to this comprehensive guide on understanding how regular expressions (regex) can be utilized for email matching. Regular expressions are powerful tools for pattern matching in strings, and when it comes to validating email addresses, they offer a flexible and efficient solution. In this gist, we will delve into the intricacies of crafting regex patterns specifically tailored for matching email addresses, covering the nuances of email syntax and common pitfalls to avoid. Whether you're a beginner seeking to grasp the basics or an experienced developer looking to refine your regex skills, this guide aims to provide clarity and practical insights into the world of email validation with regular expressions.

Summary

Regex Pattern for Email Address Validation

I'll describe a regex pattern used for validating email addresses. The pattern ensures that the email address has a valid structure, including a local part, an "@" symbol, and a domain with a valid top-level domain (TLD). I'

@fractaledmind
fractaledmind / application_controller.rb
Created May 14, 2024 15:37
Example of minimal authentication requirements for Rails app
ass ApplicationController < ActionController::Base
before_action :authenticate!
helper_method :current_user
helper_method :user_signed_in?
private
def authenticate
@current_user = nil
@drewolbrich
drewolbrich / CoordinateSpaceAxesEntity.swift
Last active May 14, 2024 23:42
A RelaityKit entity that draws coordinate space axes
//
// CoordinateSpaceAxesEntity.swift
//
// Created by Drew Olbrich on 7/8/23.
// Copyright © 2023 Lunar Skydiving LLC. All rights reserved.
//
// MIT License
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
@juanbrujo
juanbrujo / PlayStationBIOSFilesNAEUJP.md
Last active May 14, 2024 23:41
Files for PlayStation BIOS Files NA-EU-JP