Skip to content

Instantly share code, notes, and snippets.

View lukas-h's full-sized avatar
🎯
Focusing

Lukas Himsel lukas-h

🎯
Focusing
  • Nuremberg, Germany
  • 14:09 (UTC +02:00)
View GitHub Profile

What we've learnt so far about React

JSX

Javascript XML: It's a Javascript syntax extension and is compiled to Javascript with React Elements using Babel.

examples:

  const element = <h1>Hello, World!</h1>
Future<void> main() async {
// List/Iterable:
var array = [1,2,3,4];
array.forEach(print);
for(var item in array) {
print(item);
}

Lorem Ipsum is simply dummy text of the printing and typesetting industry.

Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book.

It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum.

ALT TEXT

@lukas-h
lukas-h / README.md
Last active April 12, 2024 09:37
Discord Motivational Gong Bot (on pull request merge)
  1. Put the gong-bot.yml in the folder .github/workflows in your repository
  2. Add a new webhook in the Discord Server Settings > Integrations > Webhooks
  3. Copy the webhook url
  4. Add the secret DISCORD_WEBHOOK in your GitHub repository Actions secrets

This is the gong gif:

@lukas-h
lukas-h / enum.dart
Created May 2, 2024 19:09
enum de-serialization :'(
enum TimerState {
eric('stopped'),
idle('stopped'),
running('running'),
paused('paused'),
finished('finished');
final String serializeName;
const TimerState(this.serializeName);
@lukas-h
lukas-h / Dockerfile
Created May 7, 2024 13:01
Python PIP Dockerfile
dockerfile
# Use a Python base image matching your project's Python version
FROM python:3.9
# Set the working directory to /app
WORKDIR /app
# Copy the requirements file into the container
COPY requirements.txt .
import 'package:flutter/material.dart';
class EditorScreen<T> extends StatefulWidget {
final double height;
final double width;
final Widget Function(BuildContext context, T? data) builder;
const EditorScreen({
Key? key,
this.height = 200,
import 'package:cron_consume_microservice/cron_consume_microservice.dart'
as cron_consume_microservice;
import 'dart:convert';
import 'dart:io';
import 'package:shelf/shelf.dart' as shelf;
import 'package:shelf/shelf_io.dart' as io;
import 'package:shelf_router/shelf_router.dart';
void main(List<String> arguments) {