Skip to content

Instantly share code, notes, and snippets.

View sburlot's full-sized avatar

Stephan Burlot sburlot

View GitHub Profile
# !/usr/bin/env python3
# Nicolas Seriot
# 2022-06-10
# https://seriot.ch/visualization/truchet_simple.png
import cairo
import math
import random
NB_COLS = 8
# !/usr/bin/env python3
# Nicolas Seriot
# 2022-06-14
# https://seriot.ch/visualization/truchet_2.png
# loosely inspired by https://www.fxhash.xyz/gentk/slug/dirty-interlaced-truchet-tiles-18
import cairo
import math
import random
@0xced
0xced / XCDFakeCarrier.m
Last active March 5, 2023 22:07
Hack to choose the displayed carrier name in the iOS simulator
//
// Copyright (c) 2012-2015 Cédric Luthi / @0xced. All rights reserved.
//
#import <Foundation/Foundation.h>
#if TARGET_OS_SIMULATOR
static const char *fakeCarrier;
static const char *fakeTime;
@nfarina
nfarina / UIView+FrameAdditions.h
Created August 21, 2012 06:40
UIView Frame helper getter/setter category methods
#import <UIKit/UIKit.h>
@interface UIView (SMFrameAdditions)
@property (nonatomic, assign) CGPoint $origin;
@property (nonatomic, assign) CGSize $size;
@property (nonatomic, assign) CGFloat $x, $y, $width, $height; // normal rect properties
@property (nonatomic, assign) CGFloat $left, $top, $right, $bottom; // these will stretch the rect
@end
@dergachev
dergachev / GIF-Screencast-OSX.md
Last active May 2, 2024 05:55
OS X Screencast to animated GIF

OS X Screencast to animated GIF

This gist shows how to create a GIF screencast using only free OS X tools: QuickTime, ffmpeg, and gifsicle.

Screencapture GIF

Instructions

To capture the video (filesize: 19MB), using the free "QuickTime Player" application: