INSTRUCTIONS:
Put both files in a folder, then create a subfolder named "extracted". Run readPhotoshopIcons.php to extract images then run readPhotoshopIconNames.php to rename files to their correct names.
// Adapted from Stack Overflow answer by David Crow http://stackoverflow.com/a/43235 | |
// Question: Algorithm to randomly generate an aesthetically-pleasing color palette by Brian Gianforcaro | |
// Method randomly generates a pastel color, and optionally mixes it with another color | |
func generateRandomPastelColor(withMixedColor mixColor: UIColor?) -> UIColor { | |
// Randomly generate number in closure | |
let randomColorGenerator = { ()-> CGFloat in | |
CGFloat(arc4random() % 256 ) / 256 | |
} | |
var red: CGFloat = randomColorGenerator() |
// | |
// Async.swift | |
// | |
// Created by Tobias DM on 15/07/14. | |
// | |
// OS X 10.10+ and iOS 8.0+ | |
// Only use with ARC | |
// | |
// The MIT License (MIT) | |
// Copyright (c) 2014 Tobias Due Munk |
// Match based on class | |
.shadow { | |
@horizontal: 1px; | |
@vertical: 2px; | |
@blur: 15px; | |
@spread: 2px; | |
@color: rgba(0,0,0,0.4); | |
box-shadow: @horizontal @vertical @blur @spread @color; | |
} |
<?php | |
$filepath = "/Applications/Adobe Photoshop CC 2017/Adobe Photoshop CC 2017.app/Contents/Resources/IconResources.idx"; | |
$headerMagic = "Photoshop Icon Resource Index 1.0\n"; | |
$fp = fopen($filepath, "r"); | |
$magic = fread($fp, strlen($headerMagic)); | |
if ($magic != $headerMagic) { | |
exit("error: wrong magic"); |
INSTRUCTIONS:
Put both files in a folder, then create a subfolder named "extracted". Run readPhotoshopIcons.php to extract images then run readPhotoshopIconNames.php to rename files to their correct names.
#import <Foundation/Foundation.h> | |
#import <AppKit/AppKit.h> | |
int main(int argc, char *argv[]) { | |
@autoreleasepool { | |
NSPasteboard *pasteboard = [NSPasteboard generalPasteboard]; | |
NSLog(@"items: %@", pasteboard.pasteboardItems); | |
for (NSPasteboardItem *item in pasteboard.pasteboardItems) { | |
NSLog(@"types: %@", item.types); | |
for (NSString *type in item.types) { |
buttons = document.getElementsByTagName("button"); | |
for (key in buttons) { | |
button = buttons[key]; | |
attributes = button.attributes | |
if (attributes != undefined && attributes.getNamedItem('aria-label')) { | |
label = attributes.getNamedItem('aria-label') | |
value = String(label.value) | |
if (value == "Load more\n") { | |
console.log("clicking load more!"); | |
button.click(); |
import UIKit | |
extension UIGestureRecognizer { | |
@discardableResult convenience init(addToView targetView: UIView, | |
closure: @escaping () -> Void) { | |
self.init() | |
GestureTarget.add(gesture: self, | |
closure: closure, | |
toView: targetView) |
@import ObjectiveC.runtime; | |
@import MachO.dyld; | |
@import Foundation; | |
@interface IDELaunchParametersSnapshot : NSObject | |
+ (id)launchParametersWithSchemeIdentifier:(id)schemeIdentifier | |
launcherIdentifier:(id)launcherIdentifier | |
debuggerIdentifier:(id)debuggerIdentifier | |
launchStyle:(int)launchStyle | |
runnableLocation:(id)runnableLocation |
@protocol AutoHook <NSObject> | |
@required | |
+ (NSArray <NSString *> *)targetClasses; | |
@end |