Skip to content

Instantly share code, notes, and snippets.

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

Leslie Arkorful lesliearkorful

🏠
Working from home
View GitHub Profile
@Tamal
Tamal / git-ssh-error-fix.sh
Last active November 14, 2024 11:16
Solution for 'ssh: connect to host github.com port 22: Connection timed out' error
$ git clone [email protected]:xxxxx/xxxx.git my-awesome-proj
Cloning into 'my-awesome-proj'...
ssh: connect to host github.com port 22: Connection timed out
fatal: Could not read from remote repository.
$ # This should also timeout
$ ssh -T [email protected]
ssh: connect to host github.com port 22: Connection timed out
$ # but this might work
@roipeker
roipeker / image_color_picker_widget.dart
Last active August 27, 2024 07:51
Basic image pixel color detection in Flutter (supports screenshots of the widget tree)
//////////////////////////////
//
// 2019, roipeker.com
// screencast - demo simple image:
// https://youtu.be/EJyRH4_pY8I
//
// screencast - demo snapshot:
// https://youtu.be/-LxPcL7T61E
//
//////////////////////////////
@lesliearkorful
lesliearkorful / rowOffsetHeight.dart
Last active July 27, 2020 20:18
Pin-point the offset height of an item in a 3-width grid
void main() {
int listLength = 24;
int index = 5;
int h = (listLength * 66) ~/ 3;
int col = index % 3;
print('find index: $index');
print('gridHeight: $h');
print('rows : ${h / 66}');
print('column : ${col + 1}');
print('row height: ${((((index - 1) * 66) / 3) + 88) - (col * 22)}');
@lesliearkorful
lesliearkorful / custom-vscode-github-theme
Last active May 5, 2021 12:10
A color customization snippet for Github Light and Dark Themes in VS Code
"editor.semanticTokenColorCustomizations": {
"enabled": true
},
"workbench.colorCustomizations": {
"[GitHub Dark]": {
"statusBar.debuggingBackground": "#af5c19",
"statusBar.background": "#1767c3",
"statusBar.foreground": "#ffffff",
"statusBar.noFolderBorder": "#000000",
"editor.background": "#1f262b",
@lesliearkorful
lesliearkorful / google-logo-flutter.dart
Last active September 23, 2024 01:40
Google's "G" logo purely drawn in Flutter
// written by @lesliearkorful
import 'package:flutter/material.dart';
void main() {
runApp(MyApp());
}
class MyApp extends StatelessWidget {
@override
Widget build(BuildContext context) {