This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ==UserScript== | |
// @name pull/:id/files helpers (Approve PR) | |
// @namespace http://tampermonkey.net/ | |
// @version 1.0 | |
// @description Automatically clicks the "Review Changes" and "Approve" buttons on key press (\) | |
// @author Tanner Bennett | |
// @match https://github.com/TinderApp/tinder_ios/pull/*/files | |
// @icon https://www.google.com/s2/favicons?sz=64&domain=github.com | |
// @grant none | |
// ==/UserScript== |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
func memoryFootprint() -> mach_vm_size_t? { | |
let integer_t_size = MemoryLayout<integer_t>.size | |
let count = mach_msg_type_number_t(MemoryLayout<task_vm_info_data_t>.size / integer_t_size) | |
let TASK_VM_INFO_REV1_COUNT = mach_msg_type_number_t(MemoryLayout.offset(of: \task_vm_info_data_t.min_address)! / integer_t_size) | |
var info = task_vm_info_data_t() | |
let kr = withUnsafeMutablePointer(to: &info) { infoPtr in | |
infoPtr.withMemoryRebound(to: integer_t.self, capacity: Int(count)) { intPtr in | |
return task_info(mach_task_self_, task_flavor_t(TASK_VM_INFO), intPtr, &count) | |
} |