Skip to content

Instantly share code, notes, and snippets.

View floriankrueger's full-sized avatar
🏠
Working from home

Florian Krüger floriankrueger

🏠
Working from home
View GitHub Profile
@floriankrueger
floriankrueger / presentation.yaml
Last active December 18, 2015 14:29
Just a presentation I did on unit testing in Xcode to wrap up the whole topic and provide a basis for our in-team discussion. It uses the SublimeScreencastDirector plugin by @colinta to be "played". (https://github.com/colinta/SublimeScreencastDirector) Unfortunately, it's in german. But the code examples are kind of international ;)
- clear: 0 # screen 00 : Titel
- set_syntax: 'Packages/Text/Plain text.tmLanguage'
- goto: [4, 14]
- write_lines:
- 'Unittesting für iOS & OS X'
- goto: [5, 14]
- delay: 500
- write_lines:
- '=========================='
- goto: [7, 14]
@floriankrueger
floriankrueger / findUnusedPngs.sh
Created May 23, 2012 13:27
finds and prints unreferenced png files from xcode projects
#!/bin/sh
PROJ=`find . -name '*.xib' -o -name '*.[mh]'`
for png in `find . -name '*.png'`
do
filename=`basename $png`
name=${filename%.*}
if ! grep -q $name $PROJ; then
echo "$png is not referenced"
fi
@floriankrueger
floriankrueger / buckets.spec.coffee
Created September 27, 2011 13:35
better db interaction tests with jasmine
mongodb = require 'mongodb'
Buckets = require '../../models/buckets'
describe 'buckets', () ->
# suite wide db object
db = null
# db setup
beforeEach ->
###
Creates a new bucket for a user using the given parameters (if not already above the user's limit)
@param {Object} user the document of the authenticated user
@param {String} name to be used for the bucket
@param {Number} limit to be used for the bucket (in Byte)
@param {Function} callback gets two parameters - error object (if an error occured) and the new bucket document if successful.
@api public
###
###
Creates a new bucket for a user using the given parameters (if not already above the user's limit)
@param {Object} user the document of the authenticated user
@param {String} name to be used for the bucket
@param {Number} limit to be used for the bucket (in Byte)
@param {Function} callback gets two parameters - error object (if an error occured) and the new bucket document if successful.
@api public
###
@floriankrueger
floriankrueger / forms.coffee
Created September 21, 2011 15:26
add/remove form element with jQuery
$(document).ready () ->
# RECIPE_CREATION_FORM
if $('#recipe_create_form').length > 0
# make tags field a tags field
$('#recipe_tags').tagsInput
#autocomplete_url : url_to_autocomplete_api
#autocomplete_url :
# option : value
@floriankrueger
floriankrueger / AppController.j
Created August 4, 2011 13:56
CPViewCollectionItem from Cib Problem
..
// --- create the collection item (prototype)
var myCollectionItem = [[CPCollectionViewItem alloc] initWithCibName:@"MyCollectionCell" bundle:[CPBundle mainBundle]];
[myCollection setItemPrototype:myCollectionItem]; //set the item prototype
..
[CONCEPTS FOR BOOK A]:
[
(*, w, nein, 0, keiner, *, *),
(*, *, *, *, keiner, *, 1000-1999),
(*, *, ja, *, keiner, *, *),
(*, *, *, *, keiner, *, 2000-2999),
(36-49, *, *, *, keiner, *, *)
]
[CONCEPTS FOR BOOK B]:
@floriankrueger
floriankrueger / example_VS_result.txt
Created April 11, 2011 08:52
this is an example output of a single run of the VersionSpace algorithm
1891 [main] INFO dhbw.LWBS.CA5_KB1.controller.AlgorithmUtility -
Star:
S: (36-49, w, nein, 0, keiner, Hausfrau, <1000)
G: (*, w, *, *, keiner, *, <1000)
(36-49, w, *, *, keiner, *, *)
(*, *, *, 0, keiner, Hausfrau, *)
(*, w, *, *, *, Hausfrau, <1000)
(36-49, w, *, 0, keiner, *, *)
(*, w, *, 0, keiner, Hausfrau, *)
(*, w, nein, *, keiner, *, <1000)