THIS PROJECT HAS MOVED to an actual repository at https://github.com/nevyn/SPMediaKeyTap.
# If in a playlist, play the next video. | |
tell application "Google Chrome" | |
repeat with t in tabs of windows | |
tell t | |
if URL starts with "http://www.youtube.com/watch" or URL starts with "https://www.youtube.com/watch" then | |
execute javascript " | |
var player = | |
document.getElementById('movie_player') || | |
document.getElementsByTagName('embed')[0]; | |
var next = document.getElementsByClassName('yt-uix-button-icon-playlist-bar-next')[0]; |
#include <stdio.h> | |
#include <stdlib.h> | |
#include <pthread.h> | |
#include <unistd.h> | |
#include <stdbool.h> | |
#include <time.h> | |
#include <stdarg.h> | |
#include <string.h> | |
#include "future.h" |
Author: https://www.cyanhall.com/
Core Animation's original name is Layer Kit
Core Animation is a compositing engine; its job is to compose different pieces of visual content on the screen, and to do so as fast as possible. The content in question is divided into individual layers stored in a hierarchy known as the layer tree
. This tree forms the underpinning for all of UIKit, and for everything that you see on the screen in an iOS application.
In UIView, tasks such as rendering, layout and animation are all managed by a Core Animation class called CALayer
. The only major feature of UIView that isn’t handled by CALayer is user interaction.
There are four hierarchies, each performing a different role:
Core Animation's original name is Layer Kit
Core Animation is a compositing engine; its job is to compose different pieces of visual content on the screen, and to do so as fast as possible. The content in question is divided into individual layers stored in a hierarchy known as the layer tree
. This tree forms the underpinning for all of UIKit, and for everything that you see on the screen in an iOS application.
In UIView, tasks such as rendering, layout and animation are all managed by a Core Animation class called CALayer
. The only major feature of UIView that isn’t handled by CALayer is user interaction.
There are four hierarchies, each performing a different role:
- view hierarchy
- layer tree
#import <Foundation/Foundation.h> | |
#include <dlfcn.h> | |
NSDictionary *FCPrivateBatteryStatus() | |
{ | |
static mach_port_t *s_kIOMasterPortDefault; | |
static kern_return_t (*s_IORegistryEntryCreateCFProperties)(mach_port_t entry, CFMutableDictionaryRef *properties, CFAllocatorRef allocator, UInt32 options); | |
static mach_port_t (*s_IOServiceGetMatchingService)(mach_port_t masterPort, CFDictionaryRef matching CF_RELEASES_ARGUMENT); | |
static CFMutableDictionaryRef (*s_IOServiceMatching)(const char *name); |
class Logging(object): | |
__name__ = 'logger.info(1)' | |
plist = '/System/Library/Preferences/Logging/Subsystems/' | |
def __init__(__name__, plist, *args, **kwargs): | |
super(getLogger/, self).__init__() | |
logger.info('Input parameters:\n' | |
'accessibility: "{com.apple.Accessibility.plist}"\n' |
# !/bin/bash | |
# 2k20 ~antoniofrighetto | |
# Build any XNU kernel version. Make sure you have the related MacOSX SDK version installed | |
# | |
# macOS 10.15.4 kernel compilation successfully tested on macOS 10.15.6 and Xcode 11.6 | |
# | |
# MACOS_VERSION=10.15.4 BACKUP_SDK=1 OPTIONS=RELEASE,DEVELOPMENT ./build-xnu.sh | |
# XNU_VERSION=xnu-4570.41.2 ./build-xnu.sh | |
set_macos_version() { |
#include <stdio.h> | |
#include <stdlib.h> | |
#include <sys/stat.h> | |
#include <unistd.h> | |
#include <mach/mach.h> | |
#include <mach/mach_vm.h> | |
#include <dlfcn.h> | |
#include <objc/runtime.h> | |
import AppKit | |
import Metal | |
import QuartzCore | |
let view = NSView(frame: CGRect(x: 0, y: 0, width: 600, height: 400)) | |
let circle = NSView(frame: CGRect(x: 0, y: 0, width: 50, height: 50)) | |
circle.wantsLayer = true | |
circle.layer?.backgroundColor = NSColor.red.cgColor | |
circle.layer?.cornerRadius = 25 |