Skip to content

Instantly share code, notes, and snippets.

@snower
snower / tcp2proxys.py
Created August 19, 2021 14:14
tcp2proxys
# -*- coding: utf-8 -*-
# 2021/8/19
# create by: snower
import argparse
import logging
import sevent
from sevent.helpers import tcp2proxy
@rc2dev
rc2dev / tan
Last active July 10, 2023 20:10
Helper for adding annotations to TaskWarrior tasks (https://rafaelc.org/posts/multi-line-annotations-on-taskwarrior/).
#!/usr/bin/env bash
#
# Helper for adding annotations to TaskWarrior tasks.
# Features:
# - Add multi-line annotations to your tasks using your preferred editor.
# - Add single-line annotations as always (via cli arguments) or using the editor.
#
# Copyright (C) 2021 Rafael Cavalcanti <https://rafaelc.org/dev>
# Copyright (C) 2016 djp <djp@cutter>
#
@rampfox
rampfox / TNT’s certificate.md
Last active April 21, 2024 12:26
If Crashes when opening Mac Cracked Apps

Apple removed TNT’s certificate, so the app will crash after July 12th. The current solution is to sign it yourself.

Run in Terminal

codesign --force --deep --sign - /Applications/name.app

if Permission denied don't forget to add sudo

example:

@wgzhao
wgzhao / shadowrocket.conf
Last active September 24, 2023 08:43
shadowrocket configuration file
# Shadowrocket: 2020-12-13 10:10:56
[General]
bypass-system = true
skip-proxy = 192.168.0.0/16, 10.0.0.0/8, 172.16.0.0/12, localhost, *.local, e.crashlytics.com, captive.apple.com
bypass-tun = 10.0.0.0/8,100.64.0.0/10,127.0.0.0/8,169.254.0.0/16,172.16.0.0/12,192.0.0.0/24,192.0.2.0/24,192.88.99.0/24,192.168.0.0/16,198.18.0.0/15,198.51.100.0/24,203.0.113.0/24,224.0.0.0/4,255.255.255.255/32
#dns-server = 119.29.29.29,114.114.114.114,223.5.5.5,8.8.8.8
ipv6 = false
[Rule]
DOMAIN-SUFFIX,rfi.fr,PROXY
@chriseidhof
chriseidhof / boilerplate.swift
Last active January 3, 2024 05:54
QuickMacApp
// Run any SwiftUI view as a Mac app.
import Cocoa
import SwiftUI
NSApplication.shared.run {
VStack {
Text("Hello, World")
.padding()
.background(Capsule().fill(Color.blue))
@abelliumnt
abelliumnt / ABCToken.sol
Last active November 9, 2022 16:27
Created using remix-ide: Realtime Ethereum Contract Compiler and Runtime. Load this file by pasting this gists URL or ID at https://remix.ethereum.org/#version=soljson-v0.6.4+commit.1dca32f3.js&optimize=true&gist=
pragma solidity 0.6.4;
import "./Context.sol";
import "./IERC20.sol";
import "./SafeMath.sol";
import "./Ownable.sol";
/**
* @dev Implementation of the {IERC20} interface.
*
@coolaj86
coolaj86 / Bootable Mac ISO with Linux.md
Last active March 14, 2024 19:04
Create Bootable MacOS ISO from Apple's Free PKG
@uhooi
uhooi / Makefile
Last active July 17, 2023 02:18
Makefile for iOS App development
PRODUCT_NAME := Foo
SCHEME_NAME := ${PRODUCT_NAME}
WORKSPACE_NAME := ${PRODUCT_NAME}.xcworkspace
UI_TESTS_TARGET_NAME := ${PRODUCT_NAME}UITests
TEST_SDK := iphonesimulator
TEST_CONFIGURATION := Debug
TEST_PLATFORM := iOS Simulator
TEST_DEVICE ?= iPhone 11 Pro Max
TEST_OS ?= 13.3
@bgromov
bgromov / readme.md
Last active September 30, 2023 15:35
Compiling Swift framework with mixed-in Objective-C code

Problem

You can't use bridging headers within a framework.

Solution 1 (umbrella header):

Xcode will automatically create umbrella header for you Cocoa Framework project. That will be the file named <FrameworkName>.h in the <FrameworkName> group/folder (where the rest of your sources are).

  1. To include the required Obj-C header you need to set it as Public: select it in the project explorer (left pane) and change the property Target Membership (left—Inspectors—pane) from Project to Public.
  2. Open umbrella header (<FrameworkName>.h) and import the required header as:
@HarshadRanganathan
HarshadRanganathan / .gitconfig
Created March 20, 2019 15:27
.gitconfig aliases
[alias]
##
# One letter alias for our most frequent commands.
#
# Guidelines: these aliases do not use options, because we want
# these aliases to be easy to compose and use in many ways.
##
a = add