Skip to content

Instantly share code, notes, and snippets.

View alimoeeny's full-sized avatar
💭
Strong Opinions Weakly Held

Ali Moeeny alimoeeny

💭
Strong Opinions Weakly Held
View GitHub Profile
@bradfeld
bradfeld / claude-code-configuration-guide.md
Last active March 11, 2026 15:27
Advanced Claude Code Configuration Guide - patterns for professional solo development

Feld Claude Code Configuration Guide

A comprehensive guide documenting professional solo development patterns using Claude Code. Covers workflow discipline, session persistence, automated quality gates, business operations, and EOS management across twelve repositories and eight worktrees.

Last updated: 2026-03-08


Table of Contents

[
{
"price": "USD 4.99",
"dollars": "4.99",
"country": "Algeria",
"countryCode": "DZA",
"link": "https://www.spotify.com/dz-fr/premium/",
"percentageOfUSA": 49,
"discount": 51
},
@jriquelme
jriquelme / elastic_sample.go
Created November 29, 2019 15:14
Signing of Elastic requests (https://github.com/elastic/go-elasticsearch) according to AWS v4 Signing process
cfg, err := external.LoadDefaultAWSConfig()
if err != nil {
panic(err)
}
esCfg := elasticsearch.Config{
Transport: &awssigner.V4Signer{
RoundTripper: http.DefaultTransport,
Credentials: cfg.Credentials,
Region: cfg.Region,
},
@suzp1984
suzp1984 / NSScreen+DeviceName.swift
Last active July 16, 2024 03:06
get display name from NSScreen
extension CGDirectDisplayID {
func getIOService() -> io_service_t {
var serialPortIterator = io_iterator_t()
var ioServ: io_service_t = 0
let matching = IOServiceMatching("IODisplayConnect")
let kernResult = IOServiceGetMatchingServices(kIOMasterPortDefault, matching, &serialPortIterator)
if KERN_SUCCESS == kernResult && serialPortIterator != 0 {
ioServ = IOIteratorNext(serialPortIterator)
@intentionally-left-nil
intentionally-left-nil / deloldtweets.py
Last active July 27, 2022 10:33 — forked from flesueur/deloldtweets.py
Delete (very) old tweets obtained from a twitter archive
#!/bin/python3
# Largely copied from http://www.mathewinkson.com/2015/03/delete-old-tweets-selectively-using-python-and-tweepy
# However, Mathew's script cannot delete tweets older than something like a year (these tweets are not available from the twitter API)
# This script is a complement on first use, to delete old tweets. It uses your twitter archive to find tweets' ids to delete
# How to use it :
# - download and extract your twitter archive (tweet.js will contain all your tweets with dates and ids)
# - put this script in the extracted directory
# - complete the secrets to access twitter's API on your behalf and, possibly, modify days_to_keep
# - delete the few junk characters at the beginning of tweet.js, until the first '[' (it crashed my json parser)
# - review the script !!!! It has not been thoroughly tested, it may have some unexpected behaviors...
@lisawolderiksen
lisawolderiksen / git-commit-template.md
Last active March 16, 2026 04:22
Use a Git commit message template to write better commit messages

Using Git Commit Message Templates to Write Better Commit Messages

The always enthusiastic and knowledgeable mr. @jasaltvik shared with our team an article on writing (good) Git commit messages: How to Write a Git Commit Message. This excellent article explains why good Git commit messages are important, and explains what constitutes a good commit message. I wholeheartedly agree with what @cbeams writes in his article. (Have you read it yet? If not, go read it now. I'll wait.) It's sensible stuff. So I decided to start following the

@lovubuntu
lovubuntu / Sha256.kt
Created November 24, 2017 15:58
function to generate Sha-256 in Kotlin
Class Hasher {
fun hash(): String {
val bytes = this.toString().toByteArray()
val md = MessageDigest.getInstance("SHA-256")
val digest = md.digest(bytes)
return digest.fold("", { str, it -> str + "%02x".format(it) })
}
}
@jamieweavis
jamieweavis / macos-app-icon.md
Last active February 4, 2026 14:11
How to create an .icns macOS app icon
@JosiasSena
JosiasSena / DeCryptor.java
Last active September 15, 2025 01:58
Encryptor and Decryptor for data encryption.decryption using the Android KeyStore.
/**
_____ _____ _
| __ \ / ____| | |
| | | | ___| | _ __ _ _ _ __ | |_ ___ _ __
| | | |/ _ \ | | '__| | | | '_ \| __/ _ \| '__|
| |__| | __/ |____| | | |_| | |_) | || (_) | |
|_____/ \___|\_____|_| \__, | .__/ \__\___/|_|
__/ | |
|___/|_|
*/
@velyan
velyan / StateMachine.swift
Last active July 17, 2025 00:46
Swift State Pattern
import Foundation
fileprivate protocol Statelike {
var stateMachine: StateMachine { get }
func logIn()
func logOut()
}
extension Statelike {
func logIn() {}