Skip to content

Instantly share code, notes, and snippets.

View maximilian-krauss's full-sized avatar
💥
¯\_(ツ)_/¯

Maximilian Krauß maximilian-krauss

💥
¯\_(ツ)_/¯
View GitHub Profile
@LilithWittmann
LilithWittmann / autobahn.md
Last active October 26, 2023 12:11
autobahn.md
final class Loader: BindableObject {
let didChange = PassthroughSubject<Data?, Never>()
var task: URLSessionDataTask!
var data: Data? = nil {
didSet {
didChange.send(data)
}
}
init(_ url: URL) {
@makomweb
makomweb / ViewModelBase.cs
Last active March 28, 2020 22:22
This is a view model base implementation which can be used in well known MVVM scenarios. It stores all the values in a backing dictionary and accesses it through the property name specified by the lambda expression.
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Diagnostics;
using System.Linq.Expressions;
namespace Playground {
// Notice the 3 occurrencies of the Title identifier and the abscence of additional backing fields!
public class ExampleViewModel : ViewModelBase {
public string Title {
@timverhaegh
timverhaegh / lottozahlen.sh
Created January 5, 2013 22:11
Ausgabe der aktuellen WestLotto 6aus49 Gewinnzahlen.
#!/usr/bin/env bash
URL="http://www.ergebnisse.westlotto.de/gewinnzahlen/lottozahlen.rss"
MSG="LOTTO 6aus49 Gewinnzahlen `curl -s ${URL} | egrep '<title>.*:' | sed s/.*\<title\>// | sed 's/<\/title>/; /' | sed 'N;N;s/\n//g' | sed 's/; $//'`"
echo "${MSG}"
@maximilian-krauss
maximilian-krauss / WeightbotClient.cs
Created November 13, 2012 20:15
WeightbotClient
using System;
using System.Collections.Generic;
using System.Globalization;
using System.IO;
using System.Linq;
using System.Text;
using System.Net;
using System.Web;
namespace coffeeInjection {