Skip to content

Instantly share code, notes, and snippets.

@kvnsmth
kvnsmth / example-subtree-usage.md
Last active January 14, 2025 23:15
A real world usage for git subtrees.

Let's say you have an iOS project, and you want to use some external library, like AFNetworking. How do you integrate it?

With submodules

Add the project to your repo:

git submodule add [email protected]:AFNetworking/AFNetworking.git Vendor/AFNetworking

or something to that effect.

@kashifulhaque
kashifulhaque / docker-arch.md
Last active January 14, 2025 23:15
How to install Docker and Docker Compose on Arch Linux

If you do not have yay installed, then follow these steps to install it first

Update

yay

Install

yay -S docker docker-compose
@zats
zats / FindReplace.json
Last active January 14, 2025 23:15
Alternative spellings for some emojis according to /System/Library/PrivateFrameworks/CoreEmoji.framework/Versions/A/Resources/en.lproj/FindReplace.strings
{
"💍":"diamond | engagement ring | diamond ring | diamond rings | diamonds | engagement rings",
"🆎":"blood type AB",
"❣":"heart",
"🇱🇨":"Saint Lucia | Saint Lucian flag",
"🇮🇪":"Ireland | Irish flag",
"🇨🇮":"Côte d’Ivoire | Ivory Coast | Ivorian flag",
"💎":"diamond | gem | gemstone | jewel | diamonds | gems | gemstones | jewels",
"☠️":"skull and crossbones | poison | poisonous",
"👩‍💻":"technology worker | tech worker | technologist | techie | IT worker | Apple genius | woman in technology | woman tech worker | woman technologist | woman IT worker | woman in IT | woman Apple genius",
@bahorn
bahorn / tuya_cloud.py
Created January 31, 2018 20:36
Cloud endpoint
import requests
import hashlib
import time
import uuid
import os
import copy
import json
# Fixed up version of my previous code to work with the Cloud endpoints.
# Hopefully this works.
@lechium
lechium / entitlementFinder.sh
Last active January 14, 2025 23:14
Helper scripts to find which frameworks, launch daemons or applications use certain frameworks or entitlements (fuzzy case insensitive search)
#!/bin/bash
bold=$(tput bold)
normal=$(tput sgr0)
usage() {
echo ""
echo "usage: $0 -i <input search path> -s <entitlement keyword>"
echo ""
echo -e "\tDump entitlements into a plist file OR do a fuzzy case insensitive search for entitlements in frameworks, applications and LaunchDaemons"
@nealdav
nealdav / marketing.py
Created August 26, 2016 12:33 — forked from pudquick/marketing.py
Using PrivateFrameworks to get marketing model information for Apple Macs without hitting their internet API (where possible) via python and pyobjc
# Tested on 10.11
# Note:
# The marketing information embedded in the ServerInformation.framework is not the same as what
# About This Mac displays - there are differences.
#
# For example:
# ServerInformation: 15" MacBook Pro with Retina display (Mid 2015)
# About This Mac: MacBook Pro (Retina, 15-inch, Mid 2015)
#
@bahorn
bahorn / sign.py
Last active January 14, 2025 23:11
Implementation of the Tuya API signing.
import requests
import hashlib
import time
import uuid
import os
import copy
import json
# This is based on my personal implementation but stripped down to only what is
# needed to verify it.
@usrbinkat
usrbinkat / 00-README.md
Last active January 14, 2025 23:10
Ubiquiti Unifi Access Point Network Application Controller on Kubernetes

K8s UniFi Network Application Deployment

NOTICE: under active development, currently facing pvc permissions issues

Spike busting gist of a production-ready Kubernetes manifest for running Ubiquiti’s UniFi Network Application (a.k.a. UniFi Controller) backed by a MongoDB database. All data is persisted in PersistentVolumeClaims (PVCs), and both containers ultimately run as non-root for better security.


Overview

@jasonzhouu
jasonzhouu / chinese_input_in_manjaro.md
Last active January 14, 2025 23:10
Config Chinese input method in Manjaro(Manjaro 配置中文输入法)

1. install packages

run:

yay -Syu adobe-source-han-sans-otc-fonts adobe-source-han-serif-otc-fonts 
yay -Syu fcitx fcitx-googlepinyin fcitx-im fcitx-configtool 

2. config environmental variables

sudo vim /etc/profile
@defunkt
defunkt / layout.rb
Created May 27, 2010 01:41
Dirt cheap layouts with Mustache.
require 'mustache'
class Layout < Mustache
self.template = "Header
{{{yield}}}
Footer"
end
class Index < Mustache
self.template = "The Index."