Skip to content

Instantly share code, notes, and snippets.

View grundid's full-sized avatar
💭
Coding, always.

Adrian Stabiszewski grundid

💭
Coding, always.
View GitHub Profile
enum TestAction { save, delete }
class TestConfig {
final List<FieldTester> fieldTests;
final DocumentReference editingRef;
final TestAction testAction = TestAction.save;
}
@grundid
grundid / info.geojson
Last active July 20, 2020 07:04
touristische info tafeln aus OSM
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
import 'package:flutter/material.dart';
void main() => runApp(MyApp());
class MyApp extends StatelessWidget {
@override
Widget build(BuildContext context) {
return MaterialApp(
title: 'Flutter Demo',
home: MyHomePage(),
const test = require("tape");
function calculateSeconds(input) {
const values = input.split(":");
if (values.length === 1) {
return Number(values[0]);
} else {
if (values.length === 2) {
return Number(values[0]) * 3600 + Number(values[1]) * 60;
} else {
@grundid
grundid / DataParser.java
Created August 16, 2016 08:33
Simple parser for the KBA XLS FZ 11 statistics files
import org.apache.poi.hssf.usermodel.HSSFWorkbook;
import org.apache.poi.ss.usermodel.Cell;
import org.apache.poi.ss.usermodel.Row;
import org.apache.poi.ss.usermodel.Sheet;
import org.apache.poi.ss.usermodel.Workbook;
import java.io.IOException;
import java.io.InputStream;
import java.util.ArrayList;
import java.util.Iterator;
@grundid
grundid / wgunpack.sh
Created September 13, 2013 19:14
Simple wget and untar/unzip function in a pipe. Save it into a file and put this file into /etc/profile.d. Usage: wgunpack <url>
wgunpack() {
if [[ $1 == *.zip ]]
then
wget -O tempzipfile.zip $1
unzip tempzipfile.zip
rm tempzipfile.zip
else
if [[ $1 == *tar.gz ]]
then
wget -O - $1 | tar xz
@grundid
grundid / rename_ted.cmd
Created March 4, 2012 15:10
TED static rename scripts
@echo off
move "SusanCain_2012*.*" "TED2012 - Susan Cain - The power of introverts (19m04s).mp4"
move "VijayKumar_2012*.*" "TED2012 - Vijay Kumar - Robots that fly ... and cooperate (16m46s).mp4"
move "PaulGilding_2012*.*" "TED2012 - Paul Gilding - The Earth is full (16m46s).mp4"
move "PeterDiamandis_2012*.*" "TED2012 - Peter Diamandis - Abundance is our future (16m14s).mp4"
move "DanielPauley_2010Z*.*" "Mission Blue Voyage - Daniel Pauly - The ocean's shifting baseline (09m02s).mp4"
move "PaulSnelgrove_2011G*.*" "TEDGlobal 2011 - Paul Snelgrove - A census of the ocean (16m47s).mp4"
move "KevinAlloca_2012Y*.*" "TEDYouth - Kevin Allocca - Why videos go viral (07m20s).mp4"
move "TanLe_2011X*.*" "TEDxWomen 2011 - Tan Le - My immigration story (12m16s).mp4"
move "ShlomoBenartzi_2011S*.*" "TEDSalon NY2011 - Shlomo Benartzi - Saving for tomorrow, tomorrow (17m45s).mp4"