Skip to content

Instantly share code, notes, and snippets.

View ndeuma's full-sized avatar

Niklas Deutschmann ndeuma

View GitHub Profile
@ndeuma
ndeuma / bahn-spartipps.md
Last active January 9, 2020 19:51
Bahn-Spartipps
  • Bei einer Fahrt mit einer Übernachtung immer versuchen, ein Ticket zu kaufen statt zwei Tickets. Flexpreis-Tickets sind zwei Tage lang gültig! Beispiel: Erlangen-Braunschweig über Leipzig 50,55€, Braunschweig-Berlin 27,40€ = 77,95€ zusammen. Erlangen-Berlin über Leipzig und Braunschweig: 66,10€ (alles Flexpreis mit BC50). Man kann allerdings in der Fahrplanauskunft nicht beliebige Umwege erzwingen.
  • Tarifliche Gleichstellung nutzen: Auch ohne City-Ticket kann man z.B. mit einem Ticket nach Berlin Hbf mit der S-Bahn zu allen Stationen innerhalb des S-Bahn-Rings weiterfahren

Bei vorhandener BC50:

  • Flexpreis-Ticket im Fernverkehr statt Verbund-Ticket kaufen, wenn sich bei einer Fahrt innerhalb eines Verkehrsverbunds ein Fernverkehrs-Abschnitt einbauen lässt. Mit diesem Flexpreis-Ticket kann man auch Regionalzüge und S-Bahnen nutzen. Lohnt sich natürlich nur, wenn am Start- und Zielort keine weiteren Verkehrsmittel genutzt werden müssen. Beispiel: Von Forchheim von Neumarkt zahlt man im VGN 12,30€. Wenn wir
@ndeuma
ndeuma / gist:1222362
Created September 16, 2011 15:24
Expected, but not actual JUnit 4 behavior when combining "IncludeCategory" and "ExcludeCategory" with testsuite subclasses
// I have the following tests:
@Category(SlowTest.class)
public class CargoDoorTest {
@Test
public void testCargoDoor() { }
}
public class LandingGearTest {
@Test
jeweils nach 120 Minuten, ohne Elfmeterschießen
Achtelfinale
26.6., 16:00 1:1
26.6., 20:30 0:2
27.6., 16:00 2:2
27.6., 20:30 1:0
28.6., 16:00 1:2
28.6., 20:30 0:0
29.6., 16:00 0:2
@ndeuma
ndeuma / JSONPTwitterErrorHandling.js
Created March 13, 2010 12:44
Soft HTTP Error handling for Twitter API, using jQuery and JSONP. For cross-domain JSONP requests, you cannot handle other HTTP response codes than 200.
this.getJSON = function(url, data, callback) {
var api = this;
$.getJSON(url, Utils.mergeHashes(data, { suppress_response_codes : true }),
function(result) {
if (result.error === "Could not authenticate you." ||
result.error === "This method requires authentication.")
$.getJSON(url, data, callback);
else if (result.error) {
$.event.trigger( "ajaxStop" );
api.errorCallback(result.error);
@ndeuma
ndeuma / lengthtest.js
Created February 28, 2010 23:52
The "length" property seems to be defined only on arrays, but not on maps or objects.
/*
Result of this code:
g.length = undefined
h.length = undefined
i.length = 4
Only for i, the "length" property is defined. Strange!
*/
var g = {