Skip to content

Instantly share code, notes, and snippets.

View fischerscode's full-sized avatar
🏠
Working from home

Maximilian Fischer fischerscode

🏠
Working from home
View GitHub Profile
@fischerscode
fischerscode / git.txt
Last active July 3, 2020 14:45
Remove a file from git startingfrom a specified commit
git filter-branch -f --index-filter "git rm -rf --cached FILENAME" --tag-name-filter cat -- ^COMMIT_HASH_SHORT^ --branches
@fischerscode
fischerscode / firebase-cloud-messaging-nodejs.md
Last active October 26, 2020 15:20
A short tutorial about creating a custom service account and role inside of the Goolge Cloud Platform for sending a Firebase Cloud Message (FCM) from a nodejs project.

Sending a firebase cloud message from a nodejs project using a custom service acccount

Creating the Service Account

  1. open the Google Cloud Platform
  2. select your project
  3. go to IAM & Admin
  4. go to Roles
  5. press CREATE ROLE
  6. enter a title, description and ID
  7. edit the Role launche stage as you please

How can I make the constructor of B use the same default text as the constructor A without specifying it again?

@fischerscode
fischerscode / generate_password.sh
Last active September 10, 2021 19:27
Generate a random password using urandom. eg. `./generate_password.sh 32`
#!/bin/bash
LC_ALL=C tr -dc 'A-Za-z0-9!#$%&()*+,-./:;<=>?@[\]^_`{|}~' </dev/urandom | head -c $1 ; echo
@fischerscode
fischerscode / links.md
Created November 10, 2021 21:13
Fahrad Refarat Quellen
test test test
@fischerscode
fischerscode / example_class.dart
Last active October 10, 2022 18:26
Serverpod generated example class.
// ignore_for_file: no_leading_underscores_for_library_prefixes
import 'package:serverpod/serverpod.dart' as _i1;
import 'package:serverpod/protocol.dart' as _i2;
import 'package:serverpod_auth_server/module.dart' as _i3;
import 'package:serverpod_serialization/serverpod_serialization.dart' as _i4;
class Example extends _i1.TableRow {
Example({
this.id,
required this.name,
<mxfile host="app.diagrams.net" modified="2022-11-08T00:20:26.167Z" agent="5.0 (Macintosh)" etag="mD3JkrJ4J5qzCa1Aji5g" version="20.5.3" type="device"><diagram id="50Z8j9QIt7mUmtRq36Iw" name="Seite-1">7Zjdb9owEMD/mjy2ygefjyXt1kl06sbD9la5yZF4dWzmmAL963fGNiGklLYUMW1ISMTnO+fufmfO2IviYv5Zkkl+I1JgXuincy+69MIwaIUd/NKShZF0+20jyCRNrVIlGNEnsELfSqc0hbKmqIRgik7qwkRwDomqyYiUYlZXGwtWf+uEZNAQjBLCmtIfNFW5kfbCbiW/Bprl7s1Bp29mCuKUbSRlTlIxWxNFV14USyGUeSrmMTCdPJcXY/dpy+zKMQlcvcbgup0kdz9vaDES8fDr70X326+7s6BllnkkbGojHtJSWY/VwqWhnNGCEY6jwVhwNbIzPo6TnLJ0SBZiqt0oFUke3GiQC0mfUJ8wnApQgNNSWcpYGusaI21p15RQos6tiy3YEN2QeU1xSErlvBGMkUlJ75f+acOCyIzygVBKFFaJMJpxfE5wLZAuJuMVZiQa2KSAVDDfmu5gBRGrH0QBSi5QxRp0LXZb91HHjmdVFQVOltcryFavrdxstXQFFx8s37ewbjdYf1FQoCRo8Ma41RKXFA8QCyYwS5dcmAKgjG2IyglJKM+GMNZRtCrJdxuYFgnM55gtt0BO0xS45icUUeR+VUwTQblaBt4e4AfzE/vnba+NPsU4DqoxfrS6VLHg6CahSyyAlTADXQ01puFrmb6wSZqkLVr3E7eLbOQfCmxnG9jwBHYPsO2jg+1uAxudwO4Btnd0sL1T2z1M220FG323e/y+2z/13fft4t7f3Xfdyf7Udz8W7NH7rgvk1Hc/FuzR+24YNsA2gAJPL/TFQcUsV4VrpFJMeQqpZWBsIW1cIWx0K1x
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"title": "Protocol file definition",
"oneOf": [
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"title": "protocol file with fields",
"description": "class or exception",
"oneOf": [
{
@fischerscode
fischerscode / serverpod_test_server.json
Last active March 21, 2023 12:03
getCurrentDatabaseDefinition for serverpod_test_server
{
"name": "serverpod_test",
"tables": [
{
"name": "serverpod_auth_key",
"schema": "public",
"tableSpace": null,
"columns": [
{
"name": "id",