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 | |
@IBDesignable class ShadowAttributeSettableLabel : UILabel { | |
@IBInspectable var shadowColorForCustom: UIColor = .clear | |
@IBInspectable var shadowOffsetForCustom: CGSize = .zero | |
@IBInspectable var shadowRadiusForCustom: CGFloat = 0.0 | |
override func layoutSubviews() { | |
super.layoutSubviews() |
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
$ brew reinstall ffmpeg --with-fdk-aac --with-freetype --with-libass --with-libvpx --with-sdl2 --with-x265 |
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
on run {input, parameters} | |
tell the application "Finder" to eject (every disk whose ejectable is true) | |
end run |
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
- (void)viewDidLoad { | |
[super viewDidLoad]; | |
// Set app volume to be half of the current device volume. | |
GADMobileAds.applicationVolume = 0.5; | |
... | |
} |
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
// When the file was received | |
func session(_ session: WCSession, didReceive file: WCSessionFile) { | |
//set the recieved file to default Realm file | |
var config = Realm.Configuration() | |
let paths = FileManager.default.urls(for: .documentDirectory, in: .userDomainMask) | |
let documentsDirectory = paths[0] | |
let realmURL = documentsDirectory.appendingPathComponent("data.realm") | |
if FileManager.default.fileExists(atPath: realmURL.path){ | |
try! FileManager.default.removeItem(at: realmURL) |
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
public class ImageSelectorViewController<T:Equatable> : _ImageSelectorViewController<T, ListCheckRow<T>> { | |
override public init(nibName nibNameOrNil: String?, bundle nibBundleOrNil: NSBundle?) { | |
super.init(nibName: nibNameOrNil, bundle: nibBundleOrNil) | |
} | |
convenience public init(_ callback: (UIViewController) -> ()){ | |
self.init(nibName: nil, bundle: nil) | |
completionCallback = callback | |
} |
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
open class ImageSelectorViewController<T:Equatable> : _ImageSelectorViewController<ListCheckRow<T>> { | |
} |
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
> miner.setEtherbase(eth.accounts[0]) | |
> miner.start() |
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
$ mkdir ${HOME}/sample_eth_pn |
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 RealmSwift | |
public class Field: Object { | |
public dynamic var text: String? | |
} | |
NewerOlder