Skip to content

Instantly share code, notes, and snippets.

@peiweichen
peiweichen / PHAsset+Addition.h
Created January 5, 2016 12:56
Add property to PHAsset using Associated Object and Category
#import <Foundation/Foundation.h>
#import <Photos/PHAsset.h>
@interface PHAsset (Addition)
@property (nonatomic,assign) BOOL selected;
@end
@film42
film42 / xv6-setup-yosemite.sh
Last active September 28, 2020 12:10
Get xv6 running with QEMU on OSX Yosemite
#! /usr/bin/env bash
# Get xv6 working with OSX Yosemite
# Most things were here: https://doesnotscale.com/compiling-xv6-on-os-x-10-9/
# You need homebrew installed to make this thing work
brew tap homebrew/versions && brew install gcc48
brew deps qemu | xargs brew install
export PATH=/usr/local/bin:$PATH
export CC=/usr/local/bin/gcc-4.8
brew install wget
@staltz
staltz / introrx.md
Last active May 3, 2024 13:00
The introduction to Reactive Programming you've been missing
@bunnyhero
bunnyhero / ReusableCellExample.m
Last active February 19, 2022 02:04
Example of Reactive Cocoa binding for a reusable cell.
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
{
UITableViewCell *cell =
[tableView dequeueReusableCellWithIdentifier:REUSABLE_CELL_ID];
UILabel *label = (UILabel *)[cell viewWithTag:VIEW_TAG];
Model *someModel = [self getModelFromIndexPath:indexPath];
// `takeUntil:` makes the RACObserve() signal complete (and thus breaks the subscription)
// when the cell is recycled.
@m1entus
m1entus / build-ffmpeg.sh
Last active June 11, 2023 06:42
Installing ffmpeg ios libraries armv7, armv7s, i386
#!/bin/bash
###########################################################################
# Choose your ffmpeg version and your currently-installed iOS SDK version:
#
VERSION="2.0.2"
SDKVERSION="7.0"
ARCHS="armv7 armv7s i386"
#
#
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<title>Untitled</title>
</head>
<body>
</body>
</html>