I've moved this gist to https://github.com/phynet/iOS-Schemes please check it there ;)
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
// Swift Standard Librray - String | |
// Keith Harrison http://useyourloaf.com | |
// Import Foundation if you want to bridge to NSString | |
import Foundation | |
// ==== | |
// Initializing a String | |
// ==== |
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
# coding: utf-8 | |
# Stub generator for ui module | |
# NOTES: | |
# * For classes, the base class is always assumed to be `object`. This isn't correct, but it shouldn't matter much because the | |
# generated stubs also contain inherited methods and data descriptors. Using the actual base classes would complicate things a | |
# little because the class definitions would have to appear in the correct order then. | |
# * It's not possible to get correct argspecs for functions and methods that are implemented in C, so they're always just | |
# `self, *args` (for bound methods) or `*args*` (for module-level functions) in the output. | |
import ui |
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
#import <UIKit/UIKit.h> | |
#import <objc/runtime.h> | |
// Hook with ObjC runtime functions | |
%config(generator=internal) | |
// New methods created below | |
@interface UIGestureRecognizer () | |
+ (void)hs_beginForcingAllNewGestureRecognizersToAllowPencilInput; | |
+ (void)hs_endForcingAllNewGestureRecognizersToAllowPencilInput; |
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
# coding: utf-8 | |
import appex | |
import console | |
import keychain | |
import dialogs | |
import re | |
from pygithub3 import Github |
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
from gpiozero import LED, MotionSensor, LightSensor | |
from signal import pause | |
pir = MotionSensor(21) | |
ldr = LightSensor(26) | |
light = LED(25) | |
def daytime(): | |
pir.when_motion = None | |
pir.when_no_motion = None | |
light.off() | |
def nighttime(): |
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
Project | # of Top 100 Free Apps (US) | |
---|---|---|
facebook-ios-sdk | 67 | |
Bolts-iOS | 48 | |
AFNetworking | 39 | |
Google-Mobile-Ads-SDK | 38 | |
Reachability (Apple) | 38 | |
Crashlytics | 37 | |
Flurry-iOS-SDK | 31 | |
CocoaPods | 30 | |
GoogleConversionTracking | 29 |
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
# coding: utf-8 | |
from objc_util import * | |
## this is bad python styling, but I justify it by saying the | |
## function is an alias for the UIColor class | |
def UIColor(red=1.0, green=1.0, blue=1.0, alpha=1.0): | |
UIColor = ObjCClass('UIColor') | |
r = CGFloat(red) | |
g = CGFloat(green) |
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
# coding: utf-8 | |
''' | |
NOTE: This requires the latest beta of Pythonista 1.6 (build 160022) | |
Demo of using Pythonista's own internals to implement an editor view with syntax highlighting (basically the exact same view Pythonista uses itself) | |
IMPORTANT: This is just for fun -- I was curious if it would work at all, but I don't recommend that you rely on this for anything important. The way Pythonista's internals work can change at any time, and this code is *very* likely to break in the future. | |
''' | |
import ui |
#Explorer HAT Pro, Motors, Servos and Steppers
Find this Gist at: tiny.cc/explorerhat
The Motor driver on Explorer HAT Pro can not only drive motors, but a stepper motor too. And just like the Pibrella the outputs can also drive a motor or four, or another stepper.
Explorer HATs outputs sink to ground, meaning that you need to connect whatever you're driving between 5V and the output
#MOTORS