Skip to content

Instantly share code, notes, and snippets.

@0xallie
0xallie / Namedays.js
Last active April 27, 2024 04:46
iOS 14 Scriptable Namedays widget
async function getCountry() {
let r = new Request('https://ipinfo.io/country')
let s = await r.loadString()
return s.trim()
}
function pad(n) {
return n.toString().padStart(2, '0')
}
@luismts
luismts / GitCommitBestPractices.md
Last active April 27, 2024 04:46
Git Tips and Git Commit Best Practices

Git Commit Best Practices

Basic Rules

Commit Related Changes

A commit should be a wrapper for related changes. For example, fixing two different bugs should produce two separate commits. Small commits make it easier for other developers to understand the changes and roll them back if something went wrong. With tools like the staging area and the ability to stage only parts of a file, Git makes it easy to create very granular commits.

Commit Often

Committing often keeps your commits small and, again, helps you commit only related changes. Moreover, it allows you to share your code more frequently with others. That way it‘s easier for everyone to integrate changes regularly and avoid having merge conflicts. Having large commits and sharing them infrequently, in contrast, makes it hard to solve conflicts.

@0xallie
0xallie / urlschemes.json
Last active April 27, 2024 04:45
iOS app URL schemes for Icon Themer shortcut
{
"com.8bit.bitwarden": " ",
"com.agilebits.onepassword-ios": "onepassword://",
"com.apple.airport.mobileairportutility": "apmanage://",
"com.apple.appleseed.FeedbackAssistant": "applefeedback://",
"com.apple.AppStore": "itms-apps://itunes.apple.com/",
"com.apple.AppStoreConnect": "shortcuts://run-shortcut?name=Icon%20Themer&input=%7B%22launch%22%3A%22Connect%22%7D",
"com.apple.artistconnect": "shortcuts://run-shortcut?name=Icon%20Themer&input=%7B%22launch%22%3A%22Artists%22%7D",
"com.apple.bnd": "beatsbond://",
"com.apple.Bridge": "com.apple.bridge://x",
@0xallie
0xallie / ios_ota_sideloading.md
Created January 24, 2021 00:17
OTA sideloading on iOS

Note: This requires a paid developer certificate or an enterprise certificate. A free developer certificate will not work.

Create an Example.plist file with the following content:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
  <dict>
    <key>items</key>
@0xallie
0xallie / optifine_replacements_fabric.md
Last active April 27, 2024 04:44
OptiFine replacement mods for Fabric/Quilt 1.20.x
@aamiaa
aamiaa / CompleteDiscordQuest.md
Last active April 27, 2024 04:44
Complete Recent Discord Quest

Complete Recent Discord Quest

Note

This no longer works in browser!

Note

This no longer works if you're alone in vc! Somebody else has to join you!

How to use this script:

  1. Accept the quest under User Settings -> Gift Inventory
@0xallie
0xallie / lossless-stream-rip-cheatsheet.md
Last active April 27, 2024 04:41
Lossless stream rip cheatsheet

Lossless stream rip cheatsheet

Note: This guide may be slightly outdated. It may be still useful for older releases, but nowadays the vast majority of releases are correctly tagged as WEB-DL (unless it's RARBG/rartv). Protip: prefer looking at file names instead of release names, as they tend to be more accurate.

This is a short cheatsheet to help you determine whether a release from Amazon, Hulu, or Netflix contains the lossless/untouched (as in no further loss of quality compared to what the streaming services provide) video/audio or not. Most newer P2P releases are correctly tagged, but for older releases, it cannot be reliably determined based on the tags alone.

In most cases, non-lossless rips from these services are screen captures (which, when done by professional releasers, should be high quality and contain little to no glitches – see the history section for details), but in some cases they may be simply reencoded from the untouched stream, for example to crop black bars or reencode from a

@senthilmpro
senthilmpro / youtube-play-all-playlist.js
Last active April 27, 2024 04:40
youtube channel play all videos as playlist
let cId = document.querySelector('[itemprop="identifier"]').content;
const getPlaylistId = () => {
let cId = document.querySelector('[itemprop="identifier"]').content;
if(cId?.startsWith('UC')) return 'UU' + cId.slice(2);
else return null;
}
const getPlaylistUrl = () => {
let channelId = getPlaylistId();
@senthilmpro
senthilmpro / telegram-channel-dl.js
Created March 10, 2024 15:32
telegram-channel-dl.js
// download
let counter = 0;
let prefix = "TamilFreakers";
const LAST_INDEX = 1210; // get the message Id of last message (right click on the latest post, "copy message link".. this should have latest message id")
let messages = Array(LAST_INDEX).fill(0).map((x, i) => `message${i + 1}`).reverse();
let textContents = [];
let htmlContents = [];
@senthilmpro
senthilmpro / convert-image-url-to-base64.js
Created March 10, 2024 15:30
Image URL to base64 using javascript
// snippet from google gemini
function convertImageURLToBase64(imageUrl) {
fetch(imageUrl)
.then(response => response.blob())
.then(blob => {
const reader = new FileReader();
reader.readAsDataURL(blob);
reader.onloadend = function() {
const base64data = reader.result;