Skip to content

Instantly share code, notes, and snippets.

RemeJuan / .zshrc
Created June 16, 2021 08:08
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
RemeJuan / html_utils.dart
Last active June 12, 2021 05:10
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 / html_utils_test.dart
Created March 31, 2021 04:17
Unit Testing a Utility function that returns a Widget (Test)
View html_utils_test.dart
testWidgets('cant', (tester) async {
when( async => false);
// 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 / cloudSettings
Last active December 15, 2020 03:11
Visual Studio Code Settings Sync Gist
View cloudSettings
RemeJuan / action.js
Created May 21, 2018 13:30
Race Conditions Redux
View action.js
export const searchPostNoResults = data => ({
RemeJuan / completer_hook.dart
Created July 8, 2020 18:35
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> {
HookState<Completer, Hook<Completer>> createState() => _CompleterHookState();
RemeJuan / azure.yaml
Last active April 27, 2020 03:20
Flutter pipeline config
View azure.yaml
name: Azure Pipelines
demands: xcode
- script: 'brew install fastlane'
displayName: 'Install fastlane'
- script: |
gem install bundler
RemeJuan / api.dart
Created July 6, 2019 17:37
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()
RemeJuan / form_validation.js
Created August 26, 2014 08:05
Very basic form validation for jQeury, only useful if you do not want to use wbshims to pollyfill older browsers and simply nee to validate if a field has a value.
View form_validation.js
//Basic custom form validation
$('#formSave').on('click', function() {
if($(this).val() === '') {
$(this).addClass('required').val('This field is required');
if (cfarray.length === 0) {
$('#selectedResults').addClass('required').text('This field is required')
RemeJuan / blocks.txt
Created November 3, 2018 15:09
PiHole List
View blocks.txt