Skip to content

Instantly share code, notes, and snippets.

View randomer's full-sized avatar
🍳
Omelette du Fromage

Rod randomer

🍳
Omelette du Fromage
View GitHub Profile
@yuhua-chen
yuhua-chen / Drag-and-drop-uitableviewcell-swift2.swift
Created August 6, 2015 09:12
Demo the drag and drop UITableViewCell in Swift 2.
struct Drag {
static var placeholderView: UIView!
static var sourceIndexPath: NSIndexPath!
}
func handleLongPress(gesture: UILongPressGestureRecognizer) {
let point = gesture.locationInView(tableView)
let indexPath = tableView.indexPathForRowAtPoint(point)
switch gesture.state {
@ohanhi
ohanhi / frp.md
Last active September 23, 2025 16:12
Learning FP the hard way: Experiences on the Elm language

Learning FP the hard way: Experiences on the Elm language

by Ossi Hanhinen, @ohanhi

with the support of Futurice 💚.

Licensed under CC BY 4.0.

Editorial note

@iahu
iahu / index.ios.js
Last active October 30, 2015 01:37
react-native setState issue
/**
* Sample React Native App
* https://github.com/facebook/react-native
*/
'use strict';
var React = require('react-native');
var fs = require('NativeModules').FileSystem;
var {
AppRegistry,
@robertjpayne
robertjpayne / RCTSwiftBridgeModule.h
Last active January 17, 2024 11:43
React Native - Swift Native Modules
#import <Foundation/Foundation.h>
#import "RCTBridgeModule.h"
#define RCT_EXTERN_MODULE(objc_name, objc_supername) \
RCT_EXTERN_REMAP_MODULE(objc_name, objc_name, objc_supername)
#define RCT_EXTERN_REMAP_MODULE(js_name, objc_name, objc_supername) \
objc_name : objc_supername \
@end \
@interface objc_name (RCTExternModule) <RCTBridgeModule> \
@AliSoftware
AliSoftware / struct_vs_inheritance.swift
Last active March 5, 2025 06:57
Swift, Struct & Inheritance: How to balance the will of using Struct & Value Types and the need for Inheritance?
// #!Swift-1.1
import Foundation
// MARK: - (1) classes
// Solution 1:
// - Use classes instead of struct
// Issue: Violate the concept of moving model to the value layer
// http://realm.io/news/andy-matuschak-controlling-complexity/
@JaviLorbada
JaviLorbada / FRP iOS Learning resources.md
Last active October 30, 2025 15:45
The best FRP iOS resources.

Videos

@rsperberg
rsperberg / essential-javascript-links.md
Last active October 5, 2022 17:10 — forked from ericelliott/essential-javascript-links.md
A fork that adds descriptions to Eric Elliott’s 142 essential JS links
@staltz
staltz / introrx.md
Last active October 26, 2025 03:06
The introduction to Reactive Programming you've been missing
@bucketh3ad
bucketh3ad / elm-runtime-global.js
Created June 1, 2014 00:05
Elm Runtime Global Wrapper
Elm = (function (){
//Begin elm-runtime.js
'use strict';
var Elm = ...
};
//End elm-runtime.js
Elm.MeteorHelpers = [A2,A3,A4,A5,A6,A7,A8,A9,F2,F3,F4,F5,F6,F7,F8,F9];