This file contains 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
Blaat |
This file contains 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 { useEffect } from "react" | |
import * as _ from "https://jspm.dev/react-ace" | |
export default function TestComponent() { | |
useEffect(() => { | |
const editor = ace.edit("foo") | |
editor.setTheme("ace/theme/monokai") | |
editor.session.setMode("ace/mode/javascript") | |
}) | |
return <div id="foo"></div> |
This file contains 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
/******************************************************************************* | |
* | |
* A minimal Forth compiler in C | |
* By Leif Bruder <leifbruder@gmail.com> http://defineanswer42.wordpress.com | |
* Release 2014-04-04 | |
* | |
* Based on Richard W.M. Jones' excellent Jonesforth sources/tutorial | |
* | |
* PUBLIC DOMAIN | |
* |
This file contains 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 <objc/runtime.h> | |
#import <Foundation/Foundation.h> | |
@implementation NSObject (BadAssSwizzle) | |
+ (void)load { | |
SEL originalSelector = @selector(init); | |
SEL overrideSelector = @selector(myInit); | |
Method originalMethod = class_getInstanceMethod(self, originalSelector); | |
Method overrideMethod = class_getInstanceMethod(self, overrideSelector); |
This file contains 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
protocol Reusable { | |
associatedtype T | |
static var cellReuseIdentifier: String { get } | |
static var nib: UINib { get } | |
static func register(for tableView: UITableView) | |
static func register(for collectionView: UICollectionView) | |
static func registerSectionHeaderView(for collectionView: UICollectionView) | |
static func registerSectionFooterView(for collectionView: UICollectionView) | |
static func dequeue<T>(for tableView: UITableView, at indexPath: IndexPath) -> T | |
static func dequeue<T>(for tableView: UICollectionView, at indexPath: IndexPath) -> T |