Skip to content

Instantly share code, notes, and snippets.

Tobias tordans

Block or report user

Report or block tordans

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@tordans
tordans / README.md
Last active Sep 30, 2019
Vereinfachte Verkehrsordnungswidrigkeitenanzeige bei Halt- und Parkverstößen
View 0-einleitung.md

Notizen zu Tobias' Vortrag auf dem DataCycle Meetup am 15.01.2019.

Die Notizen sind nicht selbsterklärend. Aber wer da war, findet hier alle Links die ich gezeigt habe.

@tordans
tordans / index.html
Last active May 11, 2018
Rallye: Spendenaktionen Mini-Übersicht
View index.html
<!doctype html>
<html lang="de">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.1.0/css/bootstrap.min.css" crossorigin="anonymous">
<script src="https://code.jquery.com/jquery-3.3.1.min.js" crossorigin="anonymous"></script>
<title>Ralleys</title>
@tordans
tordans / index.html
Last active Jan 1, 2018 — forked from oscarlorentzon/index.html
Sync viewer and map markers
View index.html
<!DOCTYPE html>
<html>
<head>
<meta charset='utf-8' />
<title></title>
<meta name='viewport' content='initial-scale=1,maximum-scale=1,user-scalable=no' />
<link rel='stylesheet' href='https://unpkg.com/mapillary-js@2.10.1/dist/mapillary.min.css' />
<link href='https://unpkg.com/leaflet@1.0.1/dist/leaflet.css' rel='stylesheet' />
@tordans
tordans / http http-diigo.com
Last active Dec 30, 2017
diigo.com domain errors
View http http-diigo.com
$ http http://diigo.com
HTTP/1.1 200 OK
Cache-Control: no-cache, no-store, must-revalidate, post-check=0, pre-check=0
Connection: close
Content-Encoding: gzip
Content-Length: 474
Content-Type: text/html; charset=UTF-8
Date: Sat, 30 Dec 2017 18:21:14 GMT
Expires: Mon, 31 Dec 2001 7:32:00 GMT
@tordans
tordans / fluid_gmail.js
Last active Nov 9, 2018 — forked from itod/fluid_gmail.js
Gmail Fluid App Userscript
View fluid_gmail.js
// use for patterns:
// *gmail.com*
// *mail.google.com*
// *google.com*mail*
// Initialize Badge so we see that this works
window.fluid.dockBadge = 99;
// Updater
setTimeout(updateDockBadge, 1000);
@tordans
tordans / chip-de-bestenliste-spalten-löscher.js
Created May 10, 2014
JavaScript um in der chip.de-Bestenliste Spalten zu löschen
View chip-de-bestenliste-spalten-löscher.js
// chip.de/bestenlisten/Bestenliste-Handys--index/detail/id/900/price/400/?f=0300002000010000400000000
$('th.header')
.css('position','relative')
.append('<DIV class="deleter" style="top:0;position:absolute;padding:5px;">x</DIV>');
$('.deleter')
.click( function() {
var $column_index = $(this).parent('th').index() + 1;
$('#mainTable tr').find('td:nth-child('+$column_index+'), th:nth-child('+$column_index+')').remove();
}
);
View script-console-output-with-log.rb
>> p = Project.find_by_id(1114)
# Project Load (1) (0.001019) SELECT * FROM `projects` WHERE (projects.deleted_at IS NULL OR projects.deleted_at > '2011-11-15 18:12:54') ORDER BY projects.id DESC LIMIT 1
=> #<Project id: 1114 …>
>> p.pictures.count
# Always a sql-query
# SQL (1) (0.000572) SELECT count(*) AS count_all FROM `basic_pictures` WHERE (`basic_pictures`.owner_id = 8004 AND `basic_pictures`.owner_type = 'Project') AND ( (`basic_pictures`.`type` = 'ProjectPicture' ) )
=> 60
>> p.pictures.size
@tordans
tordans / datetime helper.rb
Created Oct 24, 2011
Helpermethods for relative DateTime Stuff in StayScout
View datetime helper.rb
# Ausgabe: "Vor mehr als 5 Monaten"/"Vor etwa einem Jahr" — statt "Dauer: mehr als 5 Monate"/"Dauer: etwa 1 Jahr", wie es die Originalfunktion liefert
# Original-File: actionpack/lib/action_view/helpers/date_helper.rb, line 63
# Dokumenation: http://apidock.com/rails/v2.3.8/ActionView/Helpers/DateHelper/distance_of_time_in_words
# Changelog: I18n.with_options-Scope geändert auf "distance_in_words_gebeugt"
def distance_of_time_in_words_gebeugt(from_time, to_time = 0, include_seconds = false, options = {})
from_time = from_time.to_time if from_time.respond_to?(:to_time)
to_time = to_time.to_time if to_time.respond_to?(:to_time)
distance_in_minutes = (((to_time - from_time).abs)/60).round
distance_in_seconds = ((to_time - from_time).abs).round
You can’t perform that action at this time.