Skip to content

Instantly share code, notes, and snippets.

View orca-zhang's full-sized avatar
🎖️
<coolcode />

orca-zhang

🎖️
<coolcode />
  • Shanghai, China & Singapore
View GitHub Profile
@verygenericname
verygenericname / ios_14_downgrade.md
Last active March 26, 2024 01:34 — forked from 0xallie/checkm8_downgrade.md
How to downgrade from iOS 15 to iOS 14

Important: Please don't use the comment section to ask for help. Join r/jailbreak (#futurerestore-help) or FDR Bureau (#support) instead.

How to downgrade from iOS 15 to iOS 14

The latest SEP/BB as of right now is iOS 15.3.1, and is partially or fully compatible with iOS 14 depending on your device. See the appropriate section for exact compatibility info.

Prequisites

@orca-zhang
orca-zhang / base64.java
Last active May 29, 2019 02:57
simple base64 decode snippet
import java.util.Arrays;
public class main {
private static byte base64_reverse_table[] = {
-2, -2, -2, -2, -2, -2, -2, -2, -2, -1, -1, -2, -2, -1, -2, -2,
-2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2,
-1, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, 62, -2, -2, -2, 63,
52, 53, 54, 55, 56, 57, 58, 59, 60, 61, -2, -2, -2, -2, -2, -2,
-2, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14,
15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, -2, -2, -2, -2, -2,
@orca-zhang
orca-zhang / to_unix.go
Created March 19, 2019 13:19
Fast conversion from date to Unix Timestamp
func toUnix(year, month, day, hour, min, sec int) int64 {
if month < 1 || month > 12 {
return -1
}
leap := 0
if (year%4 == 0 && (year%100 != 0 || year%400 == 0)) && month >= 3 {
leap = 1 // February 29
}
@orca-zhang
orca-zhang / wildcards.go
Last active May 28, 2019 10:19
case sensitive wildcards match function
/*
MIT License
Copyright (c) 2010-2019 <http://ez8.co> <orca.zhang@yahoo.com>
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
@liues1992
liues1992 / pre-commit
Created September 3, 2018 06:35
golang basic pre-commit check, including gofmt goimports golint
#!/bin/sh
# Partly copy from https://tip.golang.org/misc/git/pre-commit
# Copyright 2012 The Go Authors. All rights reserved.
# Use of this source code is governed by a BSD-style
# license that can be found in the LICENSE file.
# git gofmt pre-commit hook
#
# To use, store as .git/hooks/pre-commit inside your repository and make sure
# it has execute permissions.
@orca-zhang
orca-zhang / wildcards.c
Last active February 28, 2022 08:40
case sensitive wildcards match function
/*
MIT License
Copyright (c) 2010-2017 <http://ez8.co> <orca.zhang@yahoo.com>
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
@orca-zhang
orca-zhang / memhex.c
Created January 25, 2018 14:42
A small tool used to inspect memory of remote active process under Linux without any side-effect (MAYBE, as tested).
/*
MIT License
Copyright (c) 2010-2017 <http://ez8.co> <orca.zhang@yahoo.com>
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
@yulingtianxia
yulingtianxia / LRUCache.swift
Created November 27, 2016 17:29
Swift LRUCache
class CacheGenerator<T:Hashable> : IteratorProtocol {
typealias Element = T
var counter: Int
let array:[T]
init(keys:[T]) {
counter = 0
array = keys
@angavrilov
angavrilov / gist:926972
Created April 19, 2011 07:45
mmap injection on linux (emulation of VirtualAllocEx)
/* Support for executing system calls in the context of the game process. */
static const int injection_size = 4;
static const char nop_code_bytes[injection_size] = {
/* This is the byte pattern used to pad function
addresses to multiples of 16 bytes. It consists
of RET and a sequence of NOPs. The NOPs are not
supposed to be used, so they can be overwritten. */
0xC3, 0x90, 0x90, 0x90