Skip to content

Instantly share code, notes, and snippets.

View fmeus's full-sized avatar

Frank Meus fmeus

View GitHub Profile
@bignerdranch
bignerdranch / BNRTimeBlock.h
Created March 9, 2012 13:51
Timing Utility Post 20120308
CGFloat BNRTimeBlock (void (^block)(void));
@adoyle
adoyle / raspi-init.sh
Last active April 21, 2021 11:35
Non-interactive command-line equivalents to raspi-config
# Non-interactive command-line equivalents to raspi-config
# These are not guaranteed to work under all circumstances.
# I use them in a fabric script to do unattended setup of a
# Raspberry Pi immediately after having booted up a NOOBS
# and installed Raspbian.
#
# 1. Install NOOBS
# 2. When the config screen comes up, hit TAB TAB RETURN to exit from it
# 3. Type 'sudo service ssh start' at the command line (no quotes).
# 4. (Optional) copy a public key to the pi account on the pi.
@mahmudahsan
mahmudahsan / ios_detect.h
Created September 26, 2017 11:40
iPhone X and other iOS device detection by Swift and Objective-C
#define IS_IPAD (UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPad)
#define IS_IPHONE (UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPhone)
#define IS_RETINA ([[UIScreen mainScreen] scale] >= 2.0)
#define SCREEN_WIDTH ([[UIScreen mainScreen] bounds].size.width)
#define SCREEN_HEIGHT ([[UIScreen mainScreen] bounds].size.height)
#define SCREEN_MAX_LENGTH (MAX(SCREEN_WIDTH, SCREEN_HEIGHT))
#define SCREEN_MIN_LENGTH (MIN(SCREEN_WIDTH, SCREEN_HEIGHT))
@jrlucier
jrlucier / creality_cr20pro.def.json
Last active April 30, 2020 22:09
CR-20 PRO Cura Definition (just put this in your definitions folder to add the printer to the app: ~/.local/share/cura/3.6/definitions)
{
"name": "Creality CR20 Pro",
"version": 2,
"inherits": "fdmprinter",
"metadata": {
"visible": true,
"author": "Michael Wildermuth",
"manufacturer": "Creality3D",
"file_formats": "text/x-gcode",
"preferred_quality_type": "draft",