Skip to content

Instantly share code, notes, and snippets.

View jmewes's full-sized avatar

Jan Mewes jmewes

View GitHub Profile
@jmewes
jmewes / LICENSE
Last active April 7, 2023 05:48
Drawing UML - Component Diagram
MIT License
Copyright (c) 2023 Experimental Software
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
@jmewes
jmewes / README.md
Created February 7, 2022 06:59
Read a one-word string from STDIN

Read a one-word string from STDIN

Usage

echo "Hello World" | go run main.go

Output

@jmewes
jmewes / note.md
Last active November 6, 2021 16:07
How to create a full page loading indicator

Setup

A full page loading indicator can be created with the loader_overlay package.

flutter pub add loader_overlay
import 'package:loader_overlay/loader_overlay.dart';
@jmewes
jmewes / index.md
Last active September 18, 2021 17:28
How to use assets in Flutter

How to use assets in Flutter

(a)

pubspec.yaml

flutter:

 assets:
@jmewes
jmewes / main.dart
Created June 22, 2021 04:49
Example string length property
void main() {
print(''.length);
print('a'.length);
print('abc'.length);
print('abcdefghijklmnopqrstuvwxyz'.length);
}
@jmewes
jmewes / notes.md
Last active June 6, 2021 16:52
How to access remove VPN in codeanywhere with browser

On container

# Enable SSH login
echo "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAACAQCaBEGFNl48E9S9YBP5ICcGXMvajY4et9S3JGkN65cjS2+Ws0LyFERSV027uJK7vwV9adN2a7fZCtbk7C/70Dsa5/lrf8ZE6N8lFbj/srsv+QPnj/6/MVCDbG+cgW/k0DZ2z2hwCuAZdcKnb3Pvwj02z/LtsxmH8rDruc/UQZTk/9NehiIM9QW38DnVP/IsVq9cmOt4/hT2R9nmo2uRxs/PdVcDoqwatLzO7fXO2BrufpD9M4GrEphHDc3WNe2Pf0vhEmeJQOzAkPquKb9DTe1yGSnsW9X4dpRplbWRWO70MkwAoKqwuhnX2N8Xz7pt3asbIQTV5xVaMmT9ohsTwO1Zafhjb9M0pBipwRPs4/G/CQoojLVhy6IlP+JfyrgvoEcPQQYTvfJ1JJPBM9ySJGOnUMXGtYy8zXj914ZIgoxDaydFEYhCiq23imEg8DJumNWB4mE0GjeE42ELj2dkdL6UhBFp0aRxFM9r0LeL3c6/EvoeZpoarjwiKhVc9bwyMKr1fm/IazZEwAtPOxQmsq2cqO/ybBBwE5JUgEM+nAKaSDI1Z+v5E3BghA3vl57PmgHe/bSQi4TBxFOvcdMl0dmSrLQU4SJSESbU7Tigx+HJE3gEsQxODHVjpC9r9aa1eBYI1zS3qPRtWbJJVW5nNhmJrGX/BiOLxJsuiJ4cLjBNOw== [email protected]" >> ~/.ssh/authorized_keys

# Enable Chrome browser to start
sudo apt-get install -y xvfb
sudo apt-get -y install xorg xvfb gtk2-engines-pixbuf
@jmewes
jmewes / snippet.sh
Created December 10, 2020 15:29
Show changes in stash list
git stash list | awk -F: '{ print "\n\n\n\n"; print $0; print "\n\n"; system("git --no-pager stash show -p " $1); }' | less
# See https://stackoverflow.com/questions/10725729/see-whats-in-a-stash-without-applying-it#comment27167616_10726185
# Profiling mode
flutter build web --profile
@jmewes
jmewes / notes.sh
Created June 16, 2020 07:31
Install IntellIj
cd /tmp
wget -cO jetbrains-toolbox.tar.gz "https://data.services.jetbrains.com/products/download?platform=linux&code=TBA"
tar -xzf jetbrains-toolbox.tar.gz
DIR=$(find . -maxdepth 1 -type d -name jetbrains-toolbox-\* -print | head -n1)
cd $DIR
./jetbrains-toolbox
cd ..
rm -r $DIR
rm jetbrains-toolbox.tar.gz
@jmewes
jmewes / yfuzg
Created May 31, 2020 14:06
Start web server
# Setup `webdev`
https://dart.dev/tools/webdev
# Start development server
```
webdev serve [--debug | --release] [ [<directory>[:<port>]] ... ]
```