Skip to content

Instantly share code, notes, and snippets.

@twinsant
twinsant / ocr.py
Created November 9, 2021 05:14
Pythonista Text OCR example.
import photos
import objc_util
VNImageRequestHandler = objc_util.ObjCClass('VNImageRequestHandler')
VNRecognizeTextRequest = objc_util.ObjCClass('VNRecognizeTextRequest')
def text_ocr(asset):
img_data = objc_util.ns(asset.get_image_data().getvalue())
with objc_util.autoreleasepool():
@erfansahaf
erfansahaf / SDate.php
Created December 16, 2015 22:43
a php class for work with Gregorian and Jalali dates
<?php
/* If you use Codeigniter framework, uncomment following ↓ line */
//defined('BASEPATH') OR exit('No direct script access allowed');
/*
* @name Shamsi Date (SDate)
* @author Erfan Sahafnejad <Erfan.Sahaf@gmail.com/>
* @copyright 2015 P30Skill Development Team (http://P30Skill.ir)
* @version 1.0
* @link www.P30Skill.ir
@flushwhy
flushwhy / Lazy_git.py
Created May 6, 2025 04:58
Here is my lazy py script for Git modules lol
import os
import subprocess
import sys
import requests
from urllib.parse import urlparse
def get_latest_release_or_tag(repo_url):
"""Return (tag_name, commit_sha) from the latest release or fallback to latest tag."""
parsed = urlparse(repo_url)
owner, repo = parsed.path.strip('/').replace('.git', '').split('/')
@bytexenon
bytexenon / Make Discord Server With a Tag.md
Last active May 6, 2025 05:08
Make Discord Server With a Tag

Discord Server Tag Automation Script (GUILD_TAGS)

Recently, around May 6th, 2025, Discord began allowing servers to potentially receive the GUILD_TAGS feature flag upon creation. This occurs randomly with a small chance (approximately 1 in 1000). This script attempts to automate the process of finding such a server by repeatedly creating and deleting them.

Note

Successfully obtaining a server with this flag is only the first step; actually using the tag functionality requires boosting the server 3 times

Caution

Using automated scripts and client modifications like Vencord violates Discord's Terms of Service. This can lead to account suspension or permanent banning.

@rxaviers
rxaviers / gist:7360908
Last active May 6, 2025 04:56
Complete list of github markdown emoji markup

People

:bowtie: :bowtie: πŸ˜„ :smile: πŸ˜† :laughing:
😊 :blush: πŸ˜ƒ :smiley: ☺️ :relaxed:
😏 :smirk: 😍 :heart_eyes: 😘 :kissing_heart:
😚 :kissing_closed_eyes: 😳 :flushed: 😌 :relieved:
πŸ˜† :satisfied: 😁 :grin: πŸ˜‰ :wink:
😜 :stuck_out_tongue_winking_eye: 😝 :stuck_out_tongue_closed_eyes: πŸ˜€ :grinning:
πŸ˜— :kissing: πŸ˜™ :kissing_smiling_eyes: πŸ˜› :stuck_out_tongue:
@joshbuchea
joshbuchea / semantic-commit-messages.md
Last active May 6, 2025 04:53
Semantic Commit Messages

Semantic Commit Messages

See how a minor change to your commit message style can make you a better programmer.

Format: <type>(<scope>): <subject>

<scope> is optional

Example

@ChristopherA
ChristopherA / brew-bundle-brewfile-tips.md
Last active May 6, 2025 04:53
Brew Bundle Brewfile Tips

Brew Bundle Brewfile Tips

Copyright & License

Unless otherwise noted (either in this file or in a file's copyright section) the contents of this gist are Copyright ©️2020 by Christopher Allen, and are shared under spdx:Creative Commons Attribution Share Alike 4.0 International (CC-BY-SA-4.) open-source license.

Sponsor

If you more tips and advice like these, you can become a monthly patron on my GitHub Sponsor Page for as little as $5 a month; and your contributions will be multipled, as GitHub is matching the first $5,000! This gist is all about Homebrew, so if you like it you can support it by donating to them or becoming one of their Github Sponsors.

import requests
import time
def get_line_from_page(url, line_number):
try:
# Step 1: Send a GET request to fetch the page content
response = requests.get(url)
# Step 2: Check if the request was successful
response.raise_for_status() # Will raise an exception for bad responses (4xx, 5xx)
@transitive-bullshit
transitive-bullshit / claude-code-prompts.js
Last active May 6, 2025 04:50
Unminified prompts and tool definitions for Claude Code
// Claude Code is a Beta product per Anthropic's Commercial Terms of Service.
// By using Claude Code, you agree that all code acceptance or rejection decisions you make,
// and the associated conversations in context, constitute Feedback under Anthropic's Commercial Terms,
// and may be used to improve Anthropic's products, including training models.
// You are responsible for reviewing any code suggestions before use.
// (c) Anthropic PBC. All rights reserved. Use is subject to Anthropic's Commercial Terms of Service (https://www.anthropic.com/legal/commercial-terms).
// Version: 0.2.9
@nimone
nimone / App.jsx
Created November 13, 2023 09:13
A Modal Component with ReactJS and TailwindCSS
import { useState } from "react"
import Modal from "./components/Modal"
import Trash from "./icons/Trash"
export default function App() {
const [open, setOpen] = useState(false)
return (
<main className="App">
<button className="btn btn-danger" onClick={() => setOpen(true)}>
<Trash /> Delete