Skip to content

Instantly share code, notes, and snippets.

View Leandros's full-sized avatar

Arvid Gerstmann Leandros

View GitHub Profile
@Leandros
Leandros / Helper.m
Created April 15, 2014 14:00
Size Label
+ (void)sizeLabel:(UILabel *)label toRect:(CGRect)labelRect {
label.frame = labelRect;
int maxFontSize = 18;
int minFontSize = 5;
NSInteger size = [self binarySearchForFontSizeForLabel:label withMinFontSize:minFontSize withMaxFontSize:maxFontSize withSize:label.frame.size];
label.font = [UIFont fontWithName:label.font.fontName size:size];
}
<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:sparkle="http://www.andymatuschak.org/xml-namespaces/sparkle" xmlns:dc="http://purl.org/dc/elements/1.1/">
<channel>
<title>ownDrop</title>
<link>https://gist.githubusercontent.com/Leandros/c71305e756d155004550/raw/5c87b20515e094386a680d25a259498f817d201b/test.xml</link>
<item>
<title>Version 0.5.2</title>
<description></description>
<pubDate>Sat, 31 May 2014 21:15:00 +0200</pubDate>
<sparkle:releaseNotesLink>https://raw.githubusercontent.com/Leandros/ownDrop/master/Changelog/0.5.1.html</sparkle:releaseNotesLink>
@Leandros
Leandros / Prepare.java
Last active August 29, 2015 14:05
Preperation
class Test {
public static void main(String[] args) {
List<String> list1 = new ArrayList<String>();
List<String> list2 = new ArrayList<String>();
list1.add("preInput");
list2.add("preInput");
// Compute values.
List<List<String>> list = computeValuesBasedOn(input1, input2, list1, list2);
@Leandros
Leandros / keybase.md
Created April 15, 2015 07:34
keybase.md

Keybase proof

I hereby claim:

  • I am leandros on github.
  • I am leandros (https://keybase.io/leandros) on keybase.
  • I have a public key whose fingerprint is B254 32E3 92F0 49BB BC02 9733 7ACE 7285 5519 FBEC

To claim this, I am signing this object:

1415926535897932384626433832795028841971693993751058209749445923078164062862089986280348253421170679821480865132823066470938446095505822317253594081284811174502841027019385211055596446229489549303819644288109756659334461284756482337867831652712019091456485669234603486104543266482133936072602491412737245870066063155881748815209209628292540917153643678925903600113305305488204665213841469519415116094330572703657595919530921861173819326117931051185480744623799627495673518857527248912279381830119491298336733624406566430860213949463952247371907021798609437027705392171762931767523846748184676694051320005681271452635608277857713427577896091736371787214684409012249534301465495853710507922796892589235420199561121290219608640344181598136297747713099605187072113499999983729780499510597317328160963185950244594553469083026425223082533446850352619311881710100031378387528865875332083814206171776691473035982534904287554687311595628638823537875937519577818577805321712268066130019278766111959092164201989380952572010654858632788
@Leandros
Leandros / exportOptions.plist
Last active October 29, 2015 09:06
Default exportOptions.plist
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>method</key>
<string>app-store</string>
<key>uploadSymbols</key>
<true/>
<key>uploadBitcode</key>
<true/>
@Leandros
Leandros / script.js
Last active November 26, 2015 14:50
Postly Victory
// ==UserScript==
// @name Postly Victory Sound
// @namespace Postly App, LLC
// @version 0.1
// @description try to take over the world!
// @author Arvid Gerstmann
// @match https://api.getpostly.com/*
// @match http://127.0.0.1:5000/*
// @grant none
// @require http://code.jquery.com/jquery-2.1.4.min.js
@Leandros
Leandros / HockeySender.java
Last active December 11, 2015 17:29 — forked from ashtom/HockeySender.java
Improved Gist
package net.hockeyapp.android.demo;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
import org.acra.ACRA;
import org.acra.collector.CrashReportData;
import org.acra.ReportField;
import org.acra.sender.ReportSender;
@Leandros
Leandros / blinkLED.cpp
Last active December 14, 2015 10:48
LEDs Blinken
#include <wiringPi.h>
/*
* Die PINs der LEDs. Es wird die Pin Bezeichnung von WiringPi genutzt, die hier
* (https://projects.drogon.net/raspberry-pi/wiringpi/pins/) nach zu lesen ist.
*/
#define LED_1 7
#define LED_2 0
int main()
@Leandros
Leandros / turnLEDOnOff.cpp
Last active December 14, 2015 10:48
LED ein- und ausschalten
#include <wiringPi.h>
/*
* Die PINs der LEDs. Es wird die Pin Bezeichnung von WiringPi genutzt, die hier
* (https://projects.drogon.net/raspberry-pi/wiringpi/pins/) nach zu lesen ist.
*/
#define LED_1 7
#define LED_2 0
int main()