Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@RemeJuan
RemeJuan / .zshrc
Created June 16, 2021 08:08
oh-my-zsh config
# 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 March 31, 2021 04:17
Unit Testing a Utility function that returns a Widget (Test)
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 June 12, 2021 05:10
Unit Testing a Utility function that returns a Widget (Code)
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 July 8, 2020 18:35
Flutter hook for Completer (dart:async)
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 April 27, 2020 03:20
Flutter pipeline config
pool:
name: Azure Pipelines
demands: xcode
steps:
- script: 'brew install fastlane'
displayName: 'Install fastlane'
- script: |
gem install bundler
@RemeJuan
RemeJuan / api.dart
Created July 6, 2019 17:37
flutter_api_httpclient
import 'dart:io';
import 'dart:convert';
import 'package:cookie_jar/cookie_jar.dart';
var cj = new CookieJar();
class Session {
static HttpClient client = new HttpClient()
@RemeJuan
RemeJuan / blocks.txt
Created November 3, 2018 15:09
PiHole List
0.0.0.0 mmofreegames.online
@RemeJuan
RemeJuan / action.js
Created May 21, 2018 13:30
Race Conditions Redux
export const SEARCH_POST_START = 'SEARCH_POST_START';
export const searchPostNoResults = data => ({
type: SEARCH_POST_NO_RESULTS, data,
});
@RemeJuan
RemeJuan / cloudSettings
Last active December 15, 2020 03:11
Visual Studio Code Settings Sync Gist
{"lastUpload":"2020-12-15T03:11:23.399Z","extensionVersion":"v3.4.3"}
@RemeJuan
RemeJuan / webpack.prod.js
Last active July 14, 2017 17:21
PWA: Webpack
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(