Skip to content

Instantly share code, notes, and snippets.

View Broich's full-sized avatar

Kersten Broich

View GitHub Profile
@Broich
Broich / DWBN_Streaming_Changelog_1.1
Last active December 12, 2015 06:48
DWBN Streaming 1.1 Technical Changelog
DWBN Streaming Update 1.1
Changelog - Tech Doc
=================================
Main Changes:
- Login Caching removed: Authentification of user login data takes place every time the application started
- Push Notifications: Push Notifications get send once the streaming schedule was updated.
Push Notifications will inform the user about new streaming dates available.
However it will not set an automatic reminder for the lecture which still has to be set by the user.
@Broich
Broich / gist:4731337
Last active December 12, 2015 06:48
DWBN iPhone API 1.1 Changelog - Tec Doc
DWBN iPhone API 1.1
Changelog - Tec Doc
===================
- API now is written with CodeIgniter (PHP-framework) in order to provide more stability.
- Therefor complete refactoring of all I/O scripts (user authentification, device token, session information, translations)
Push Notifications:
A cronjob is starting a script every 10 minutes.
#!/bin/bash
# move to the directory which the script is placed in
# all file refences will be based off this location
cd `dirname $0`
# == Configuration Options ==
CSS_OUTPUT_FILE='css/core.css'
JS_OUTPUT_FILE='js/core.js'
class MyTabsListener implements ActionBar.TabListener {
private Fragment fragment;
public MyTabsListener(Fragment fragment) {
this.fragment = fragment;
}
@Override
public void onTabSelected(Tab tab, FragmentTransaction ft) {
ft.replace(android.R.id.content, this.fragment);
#########################
# .gitignore file for Xcode4 / OS X Source projects
#
# Version 2.0
# For latest version, see: http://stackoverflow.com/questions/49478/git-ignore-file-for-xcode-projects
#
# 2013 updates:
# - fixed the broken "save personal Schemes"
#
# NB: if you are storing "built" products, this WILL NOT WORK,
@Broich
Broich / verfuegbarkeit
Created February 5, 2014 17:12
Verfügbarkeits-Logik
- verfuegbarkeit: {
- zeitraeume: [
- zeitraum: {
from: 1391248659
until: 1422784659
- tage: [
UIImageView *imageView = [[UIImageView alloc] initWithFrame:self.swipeView.frame];
NSURL *url = [NSURL URLWithString:[NSString stringWithFormat:@"%@%@", DefiImageURL, self.defi.imageURLs[index]]];
NSLog(@"%@", url);
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:url];
[request setValue:AuthorizationTokenValue forHTTPHeaderField:@"X-AUTH-TOKEN"];
__weak UIImageView *myImageView = imageView;
imageView = myImageView;
UIView *userNameHackView = [[UIView alloc] initWithFrame:CGRectMake(0.0f, 0.0f, 15.0f, 20.0f)];
self.usernameTextField.leftView = userNameHackView;
self.usernameTextField.leftViewMode = UITextFieldViewModeAlways;
- (void)layoutSubviews
{
[super layoutSubviews];
if (self.viewOption == BKCollectionViewOptionGalery) {
NSLog(@"layout for galery");
self.userImageView.frame = CGRectMake(5.0f, 5.0f, 143.0f, 143.0f);
self.nameLabel.frame = CGRectMake(5.0f, 153.0f, 143.0f, 20.0f);
self.separationLine.frame = CGRectMake(5.0f, 174.0f, 143.0f, .5f);
self.onlineStatusImageView.frame = CGRectMake(5.0f, 175.0f, 20.0f, 15.0f);
<?php
$uploaddir = 'images/';
$file = basename($_FILES['file']['name']);
$uploadfile = $uploaddir . $file;
if (move_uploaded_file($_FILES['file']['tmp_name'], $uploadfile)) {
echo "OK";
} else {
echo "ERROR";
}