Skip to content

Instantly share code, notes, and snippets.

View WeZZard's full-sized avatar
😄
Coding maniac.

WeZZard WeZZard

😄
Coding maniac.
View GitHub Profile
# IDA (disassembler) and Hex-Rays (decompiler) plugin for Apple AMX
#
# WIP research. (This was edited to add more info after someone posted it to
# Hacker News. Click "Revisions" to see full changes.)
#
# Copyright (c) 2020 dougallj
# Based on Python port of VMX intrinsics plugin:
# Copyright (c) 2019 w4kfu - Synacktiv
@IsaacXen
IsaacXen / README.md
Last active November 3, 2024 04:19
(Almost) Every WWDC videos download links for aria2c.
@pofat
pofat / get_pre_main_time.swift
Created February 16, 2020 14:23
Get pre-main time
/// Call this at main()
/// return: time in milliseconds
func getPreMainTime() -> Double {
let currentTimeIntervalInMilliSecond = Date().timeIntervalSince1970 * 1000.0
var procInfo = kinfo_proc()
let pid = ProcessInfo.processInfo.processIdentifier
var cmd: [Int32] = [CTL_KERN, KERN_PROC, KERN_PROC_PID, pid]
var size = MemoryLayout.stride(ofValue: procInfo)
// Retrieve information of current process
if sysctl(&cmd, UInt32(cmd.count), &procInfo, &size, nil, 0) == 0 {
@heartnn
heartnn / best.txt
Last active December 15, 2023 02:32
DNS for speedup Nintendo Switch (Chinese User)
112.106.53.22 cache01-kcn.ic
112.106.53.34 cache04-kcn.ic
121.202.130.66 m121-202-130-66.smartone.com
203.225.255.10 whcc.kolon.co.kr
203.225.255.11
211.111.172.71 a01.kuwoo.co.kr
211.111.172.72 a02.kuwoo.co.kr
219.84.192.250 219-84-192-250.STATIC.so-net.net.tw
//
// JSON.swift
//
//
// Created by ZHANG Yi on 2015-9-1.
//
// The MIT License (MIT)
//
// Copyright (c) 2015 ZHANG Yi <[email protected]>
//
@jirutka
jirutka / sample.png
Last active April 26, 2023 14:03
Nested numbered list with correct indentation in CSS. Live example at http://jsfiddle.net/a84enL8k/.
sample.png
@luosheng
luosheng / gist:ea8b0e91c9f0bd1e5245
Created July 24, 2014 02:48
Font with fallback
UIFontDescriptor *fontDescriptor = [UIFontDescriptor fontDescriptorWithFontAttributes:@{
UIFontDescriptorNameAttribute: @"SourceSansPro-Regular",
UIFontDescriptorCascadeListAttribute:
@[
[UIFontDescriptor fontDescriptorWithFontAttributes:@{ UIFontDescriptorNameAttribute: @"Hiragino Sans GB W3" }]
]
}];
});
UIFont *font = [UIFont fontWithDescriptor:fontDescriptor size:pointSize];
@jverkoey
jverkoey / ios7springs.m
Created April 9, 2014 13:59
iOS 7 spring damping and stiffness calculation
@interface NSObject ()
- (void)generateSpringPropertiesForDuration:(float)arg1 damping:(float)arg2 velocity:(float)arg3;
- (id)_defaultAnimationForKey:(id)arg1;
@end
// This object calculates the damping and stiffness coefficients, given a damping value (0...1], a velocity, and a duration.
id obj = [[NSClassFromString(@"UIViewSpringAnimationState") alloc] init];
[obj generateSpringPropertiesForDuration:10 damping:0.5 velocity:10];
@soarez
soarez / ca.md
Last active October 29, 2024 18:12
How to setup your own CA with OpenSSL

How to setup your own CA with OpenSSL

For educational reasons I've decided to create my own CA. Here is what I learned.

First things first

Lets get some context first.

@crmne
crmne / Convert Currency.scpt
Last active April 13, 2018 10:47
Converts currencies using Google Finance. Created specifically for LaunchBar, just put it in `~/Library/Application Support/LaunchBar/Actions`. It accepts input in this form: `<amount> <from currency> […] <to currency>`. So for example all of those strings will result in the same conversion: "60 gbp to eur" "60 gbp in eur" "60 gbp eur". It will …
on parse_input_string(theString)
set AppleScript's text item delimiters to " "
set theFromAmount to text item 1 of theString as text
if length of text items of theString is greater than 1 then
set theFromCurrency to text item 2 of theString as text
set theToCurrency to text item -1 of theString as text
set currenciesGiven to true
else
set theFromCurrency to "USD"
set theToCurrency to "EUR"