Skip to content

Instantly share code, notes, and snippets.

Avatar

Reme Le Hane RemeJuan

View GitHub Profile
@RemeJuan
RemeJuan / .zshrc
Created Jun 16, 2021
oh-my-zsh config
View .zshrc
# If you come from bash you might have to change your $PATH.
# export PATH=$HOME/bin:/usr/local/bin:$PATH
# Path to your oh-my-zsh installation.
export ZSH="/Users/remelehane/.oh-my-zsh"
# Set name of the theme to load --- if set to "random", it will
# load a random theme each time oh-my-zsh is loaded, in which case,
# to know which specific one was loaded, run: echo $RANDOM_THEME
# See https://github.com/ohmyzsh/ohmyzsh/wiki/Themes
@RemeJuan
RemeJuan / html_utils_test.dart
Created Mar 31, 2021
Unit Testing a Utility function that returns a Widget (Test)
View html_utils_test.dart
testWidgets('cant', (tester) async {
when(mockUrlLauncherHelper.cl(any)).thenAnswer((_) async => false);
when(mockCoreCubit.state).thenReturn(fixtureCoreCubitLoaded);
// assert
const mockUrl = 'https://test.test';
Future<void> future(BuildContext context) async {
await Future.delayed(const Duration(seconds: 1));
return htmlContentUtils.launchURL(context, mockUrl);
@RemeJuan
RemeJuan / html_utils.dart
Last active Jun 12, 2021
Unit Testing a Utility function that returns a Widget (Code)
View html_utils.dart
dynamic launchURL(BuildContext context, String url) async {
if (url == 'about:blank') return;
if (url.startsWith('internal://')) {
final isGroups = url.contains('/groups');
if (isGroups) return _handleUnsupported(context);
}
}
@RemeJuan
RemeJuan / completer_hook.dart
Created Jul 8, 2020
Flutter hook for Completer (dart:async)
View completer_hook.dart
import 'dart:async';
import 'package:flutter/src/widgets/framework.dart';
import 'package:flutter_hooks/flutter_hooks.dart';
class _CompleterHook extends Hook<Completer> {
@override
HookState<Completer, Hook<Completer>> createState() => _CompleterHookState();
}
@RemeJuan
RemeJuan / azure.yaml
Last active Apr 27, 2020
Flutter pipeline config
View azure.yaml
pool:
name: Azure Pipelines
demands: xcode
steps:
- script: 'brew install fastlane'
displayName: 'Install fastlane'
- script: |
gem install bundler
@RemeJuan
RemeJuan / api.dart
Created Jul 6, 2019
flutter_api_httpclient
View api.dart
import 'dart:io';
import 'dart:convert';
import 'package:cookie_jar/cookie_jar.dart';
var cj = new CookieJar();
class Session {
static HttpClient client = new HttpClient()
View blocks.txt
0.0.0.0 mmofreegames.online
@RemeJuan
RemeJuan / action.js
Created May 21, 2018
Race Conditions Redux
View action.js
export const SEARCH_POST_START = 'SEARCH_POST_START';
export const searchPostNoResults = data => ({
type: SEARCH_POST_NO_RESULTS, data,
});
@RemeJuan
RemeJuan / cloudSettings
Last active Dec 15, 2020
Visual Studio Code Settings Sync Gist
View cloudSettings
{"lastUpload":"2020-12-15T03:11:23.399Z","extensionVersion":"v3.4.3"}
View webpack.prod.js
const SWPrecacheWebpackPlugin = require('sw-precache-webpack-plugin');
const WebpackPwaManifest = require('webpack-pwa-manifest');
const PUBLIC_PATH = 'https://www.remelehane.me/';
module: {
// Snip
plugins: [
// Snip
new SWPrecacheWebpackPlugin(