Skip to content

Instantly share code, notes, and snippets.

View gekitz's full-sized avatar
🌴
On vacation

Georg Kitz gekitz

🌴
On vacation
View GitHub Profile
@gekitz
gekitz / index.html
Created November 8, 2021 07:12
Popup Sample
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Sample Site</title>
<!-- Script for showing/hiding thte modal -->
<script>
window.onload = function() {
// check if user uses a mobile device
@gekitz
gekitz / TooltipView.swift
Created September 5, 2018 17:14 — forked from simonwuyts/TooltipView.swift
Customizable Tooltips
//
// TooltipView.swift
// Customizable Tooltips
//
// Copyright © 2017 Simon Wuyts
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
@gekitz
gekitz / sample-office-time-tracking.json
Created February 27, 2017 08:29
sample-office-time-tracking.json
{
"created": "2017-02-24T12:53:56.369+01:00",
"id": 0,
"started": "2017-02-27T09:27:46.279+01:00",
"updated": "2017-02-24T12:53:56.369+01:00",
"user": 14,
"uuid": "e5cba7d9-bca9-40ce-8ad7-b953c2996c3a",
"hq_work_end": "2017-02-27T09:27:54.047+01:00",
"hq_work_start": "2017-02-27T09:27:46.279+01:00"
}
override func addSubview(view: UIView) {
//for some reason view could also be nil,
//even though it's not an optional
let possibleNilView:UIView? = view as UIView?
if let v = possibleNilView? {
if v.dynamicType.description() == "_" + "UITableViewCell" + "SeparatorView" {
return
}
@gekitz
gekitz / sample.swift
Created July 23, 2014 21:10
Why do I have to do this, shouldn't autolayout figure out the height on it's own?
class GKTextAlertContentView: UIView {
@IBOutlet var titleLabel: UILabel!
@IBOutlet var textLabel: UILabel!
@IBOutlet var textField: UITextField!
@IBOutlet var submitButton: UIButton!
override func intrinsicContentSize() -> CGSize {
let titleSize = titleLabel.intrinsicContentSize()
@gekitz
gekitz / file.m
Created April 30, 2014 11:07
Never do that if performance matters
- (BOOL)twitterAuthorized {
ACAccountStore *store = [ACAccountStore new];
ACAccountType *accountType = [store
accountTypeWithAccountTypeIdentifier:ACAccountTypeIdentifierTwitter];
return [accountType accessGranted];
}
@gekitz
gekitz / keybase.md
Created April 16, 2014 22:38
keybase.md

Keybase proof

I hereby claim:

  • I am gekitz on github.
  • I am gekitz (https://keybase.io/gekitz) on keybase.
  • I have a public key whose fingerprint is 9F42 1470 F4EB 8B9E 8984 A6C3 3320 A90A 9784 0D27

To claim this, I am signing this object:

@gekitz
gekitz / sample.m
Last active December 21, 2015 10:19
const char *attributes = "T@\"DeliveryPlatform\",&,D,N";
const char *ret;
char buffer[1 + strlen(attributes)];
strcpy(buffer, attributes);
char *state = buffer, *attribute;
while ((attribute = strsep(&state, ",")) != NULL) {
if (attribute[0] == 'T') {
ret = (const char *)[[NSData dataWithBytes:(attribute + 3) length:strlen(attribute) - 4] bytes];
}
}
@gekitz
gekitz / gist:6145781
Created August 3, 2013 08:57
Auto Layout Question
What I want to have is the following layout
-5-[label with flexible width]->=5-[uiimageview with fix width]-5-
the problem is the >= 5 in the middle is always treated as a 5 instead of a flexible width which should be bigger than 5.
My visual constraint looks like this:
@"|-(5)-[_usernameLabel]-(>=5)-[_userImageView(34)]-5-|"
Anyone any ideas how to achive the layout I want?
---
layout: default
---
<h2 class="tag">{{ page.title }}</h2>
{% for post in site.tags[page.tag] %}
<div class="tag_entry">
<h3>
<a class="content_head" href="{{ post.url }}">{{ post.title }}</a>
</h3>
<div>