Skip to content

Instantly share code, notes, and snippets.

View artemnovichkov's full-sized avatar
👨‍💻
Write code. Blow minds.

Artem Novichkov artemnovichkov

👨‍💻
Write code. Blow minds.
View GitHub Profile
@brennanMKE
brennanMKE / EventEmitter.swift
Last active March 19, 2025 05:42
React Native Event Emitter for RCTEventEmitter in Objective-C and Swift
class EventEmitter
/// Shared Instance.
public static var sharedInstance = EventEmitter()
// ReactNativeEventEmitter is instantiated by React Native with the bridge.
private static var eventEmitter: ReactNativeEventEmitter!
private init() {}
import WebKit
import UIKit
class WebViewController: UIViewController {
var url: URL!
var wKWebView: WKWebView!
@IBOutlet weak var containerView: UIView!
@IBOutlet weak var goBackButton: UIBarButtonItem!
@IBOutlet weak var goForwardButton: UIBarButtonItem!
@Otbivnoe
Otbivnoe / enum-all-values.swift
Last active February 8, 2018 03:42
Get the all values for enum
extension RawRepresentable {
static var allValues: [Self] {
var index = 0
let iterator: AnyIterator<Self> = AnyIterator {
let current = withUnsafePointer(to: &index) { unsafePointer in
unsafePointer.withMemoryRebound(to: Self.self, capacity: 1) { unsafePointer in
unsafePointer.pointee
}
}
import UIKit
public struct TextStyle {
let font: UIFont
let color: UIColor
let kerning: CGFloat?
let lineHeight: CGFloat?
}
import Foundation
struct Partial<Wrapped>: CustomStringConvertible, CustomDebugStringConvertible {
enum Error<ValueType>: Swift.Error {
case missingKey(KeyPath<Wrapped, ValueType>)
case invalidValueType(key: KeyPath<Wrapped, ValueType>, actualValue: Any)
}
private var values: [PartialKeyPath<Wrapped>: Any?] = [:]
@milnak
milnak / garlic-os-tips.md
Last active April 20, 2025 18:35
My set of GarlicOS tips #rg35xx

Garlic OS Tips (Windows-based)

GarlicOS Cookbook

Follow these instructions for an easy way to get up and going quickly! These are complete instructions, and will be the easiest way to get started on a new RG35XX.

Set up SD Card

Get a high quality SD (e.g. SanDisk Extreme) card, 128GB or larger, 256GB is recommended. Don't skimp here, they're cheap, and don't use the card that comes with the RG35XX as it's crap.