Skip to content

Instantly share code, notes, and snippets.

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

Johngorithm johngorithm

🏠
Working from home
View GitHub Profile
@johngorithm
johngorithm / countries.json
Created August 17, 2021 09:40 — forked from keeguon/countries.json
A list of countries in JSON
[
{name: 'Afghanistan', code: 'AF'},
{name: 'Åland Islands', code: 'AX'},
{name: 'Albania', code: 'AL'},
{name: 'Algeria', code: 'DZ'},
{name: 'American Samoa', code: 'AS'},
{name: 'AndorrA', code: 'AD'},
{name: 'Angola', code: 'AO'},
{name: 'Anguilla', code: 'AI'},
{name: 'Antarctica', code: 'AQ'},
@johngorithm
johngorithm / dart_http_rapper.dart
Last active August 22, 2021 16:33
This Rapper essentially makes it easy to test out code using the http dart library. It is plainly an abstraction to enhance testability
import 'dart:typed_data';
import 'package:http/http.dart' as http;
class HttpService {
Duration timeOutLimit = Duration(seconds: 15);
Future<http.Response> delete(Uri url, {Map<String, String>? headers, Object? body, Encoding? encoding}) {
return http.delete(url, headers: headers, body: body, encoding: encoding).timeout(timeOutLimit);
@johngorithm
johngorithm / revert_commits
Created June 6, 2022 10:42 — forked from eliza-abraham/revert_commits
Reverting Commits
Clean way to revert a commit by also leaving a log of the revert
$ git revert --strategy resolve <commit>
@johngorithm
johngorithm / issues.md
Created February 22, 2023 09:25
Set Env Setup Issues and Fixes

22 Feb 2023

Error: flutter The method 'File.create' has fewer named arguments than those of overridden method 'File.create'

StackOverflow: For me the packages in my pubspec.yaml were all up to date, but the following fixed it:

Delete pubspec.lock.
Run flutter pub get again.

Link: StackOverflow