Skip to content

Instantly share code, notes, and snippets.

@bestimmaa
bestimmaa / wanted.xml
Created January 30, 2021 14:38
Upgrade Mindstorms EV3 Home to Education - Bricklink XML
<INVENTORY><ITEM><ITEMID>3705</ITEMID><ITEMTYPE>P</ITEMTYPE><MINQTY>4</MINQTY></ITEM>
<ITEM><ITEMID>3707</ITEMID><ITEMTYPE>P</ITEMTYPE><MINQTY>2</MINQTY></ITEM>
<ITEM><ITEMID>3708</ITEMID><ITEMTYPE>P</ITEMTYPE><MINQTY>2</MINQTY></ITEM>
<ITEM><ITEMID>3737</ITEMID><ITEMTYPE>P</ITEMTYPE><MINQTY>2</MINQTY></ITEM>
<ITEM><ITEMID>32013</ITEMID><ITEMTYPE>P</ITEMTYPE><MINQTY>4</MINQTY></ITEM>
<ITEM><ITEMID>32014</ITEMID><ITEMTYPE>P</ITEMTYPE><MINQTY>2</MINQTY></ITEM>
<ITEM><ITEMID>32034</ITEMID><ITEMTYPE>P</ITEMTYPE><MINQTY>4</MINQTY></ITEM>
<ITEM><ITEMID>6629</ITEMID><ITEMTYPE>P</ITEMTYPE><MINQTY>4</MINQTY></ITEM>
<ITEM><ITEMID>32184</ITEMID><ITEMTYPE>P</ITEMTYPE><MINQTY>8</MINQTY></ITEM>
<ITEM><ITEMID>32291</ITEMID><ITEMTYPE>P</ITEMTYPE><MINQTY>4</MINQTY></ITEM>
@bestimmaa
bestimmaa / scenery_packs.ini
Created December 21, 2019 22:24
X-Plane 11 scenery_packs.ini for X-Europe / VFR Objects / HD-Mesh
I
1000 Version
SCENERY
SCENERY_PACK Custom Scenery/Aerosoft - EBBR Brussels/
SCENERY_PACK Custom Scenery/Aerosoft - LSGG Genf/
SCENERY_PACK Custom Scenery/Aerosoft - EDLP Paderborn-Lippstadt/
SCENERY_PACK Custom Scenery/Aerosoft - EGLL Heathrow/
SCENERY_PACK Custom Scenery/Aerosoft - LFMN Nice Cote d Azur X/
@bestimmaa
bestimmaa / apache_force_type
Created November 7, 2016 11:07
How to add Content/Type header to file without extension on Apache2
<Files "FILENAME">
ForceType application/json
</Files>
@bestimmaa
bestimmaa / ocmock-cheatsheet.m
Created September 19, 2016 09:06 — forked from kharmabum/ocmock-cheatsheet.m
OCMock cheatsheet
/*----------------------------------------------------*/
#pragma mark - XCTAsserts
/*----------------------------------------------------*/
XCTAssert(expression, format...);
XCTAssertTrue(expression, format...);
XCTAssertFalse(expression, format...);
XCTAssertEqual(expression1, expression2, format...);
XCTAssertNotEqual(expression1, expression2, format...);
XCTAssertNil(expression, format...);
@bestimmaa
bestimmaa / ReusableCellExample.m
Created August 16, 2016 19:40 — forked from bunnyhero/ReusableCellExample.m
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.
@bestimmaa
bestimmaa / keyboard.swift
Created July 22, 2016 12:16
Handle UIKeyboard for form screens on iOS
func keyboardShow(notification: NSNotification) {
let info: NSDictionary = notification.userInfo!
let frameV: NSValue = info[UIKeyboardFrameEndUserInfoKey] as! NSValue
let frame: CGRect = frameV.CGRectValue()
UIView.animateWithDuration(0.2, animations: {
() in
self.sview.contentInset = UIEdgeInsetsMake(0, 0, frame.size.height, 0)
})
}
@bestimmaa
bestimmaa / custom_seperator.m
Created November 11, 2015 09:04
iOS Custom UITableViewCell Seperator
// Use a custom seperator of full width
UIView *lineView = [[UIView alloc] init];
lineView.backgroundColor = kColorSeperator;
lineView.translatesAutoresizingMaskIntoConstraints = NO;
[self.contentView addSubview:lineView];
[lineView autoPinEdge:ALEdgeBottom toEdge:ALEdgeBottom ofView:self.contentView];
[lineView autoPinEdge:ALEdgeLeft toEdge:ALEdgeLeft ofView:self.contentView];
[lineView autoMatchDimension:ALDimensionWidth toDimension:ALDimensionWidth ofView:self];
[lineView addConstraint:[NSLayoutConstraint constraintWithItem:lineView attribute:NSLayoutAttributeHeight relatedBy:NSLayoutRelationEqual toItem:nil attribute:NSLayoutAttributeHeight multiplier:1.0 constant:1]];
@bestimmaa
bestimmaa / notification.m
Created July 2, 2015 06:33
iOS - Post and subscribe to NSNotification
// declare notification name in something.h
extern NSString* const touchEndNotification;
// define notification name in something.m
NSString* const touchEndNotification = @"StimulusRotationDidEnd";
// post notification
[[NSNotificationCenter defaultCenter] postNotificationName:touchEndNotification object:self];
// subscribe to notification
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(updateSurfaceView) name:touchEndNotification object:nil];
@bestimmaa
bestimmaa / .gitignore
Last active August 29, 2015 14:19 — forked from kleber-swf/.gitignore
# =============== #
# Unity generated #
# =============== #
[Tt]emp/
[Oo]bj/
[Bb]uild
[Ll]ibrary/
sysinfo.txt
# ===================================== #
@bestimmaa
bestimmaa / cinderblock.xml
Created September 19, 2014 11:46
Cinder-KCB2 cinderblock file for x86
<?xml version="1.0" encoding="UTF-8" ?>
<cinder>
<block
name="Cinder-KCB2"
id="com.wk.kcb2"
author="Wieden+Kennedy"
license="BSD"
summary="Kinect v2 Common Bridge block for Cinder"
git="git@github.com:wieden-kennedy/Cinder-KCB2.git"
version="0.2"