Skip to content

Instantly share code, notes, and snippets.

View greglittlefield-wf's full-sized avatar

Greg Littlefield greglittlefield-wf

  • Workiva
  • Scottsdale, Arizona
View GitHub Profile
@greglittlefield-wf
greglittlefield-wf / chrome-inspect.sh
Last active October 12, 2019 07:42
Chrome-inspect pages on adb-connected devices from the terminal
if [[ "$1" == "--help" ]]; then
echo "usage: $0 [-u page_url_substring] [-t page_title_substring]"
exit
fi
if ! builtin type -p chrome-cli &>/dev/null; then
echo chrome-cli is required to run this script.
echo You can use Homebrew to install it: "'brew install chrome-cli'"
exit 1
fi
@greglittlefield-wf
greglittlefield-wf / chat-osx-custom.css
Last active February 18, 2016 18:02
Custom HipChat CSS
/* Do font-size on the chat container so all font can respond to zoom. */
.chat_text {
/* These are %-based to enable text size scaling options. The default text size is defined
by a function on the WebPreferences object */
font-size: 100%;
}
p, div, .nameBlock p, .messageBlock p, .messageBlock div, .messageBlock pre {
font-size: inherit;
}
@greglittlefield-wf
greglittlefield-wf / react_wrappers.dart
Created June 1, 2015 05:45
react-dart cloneElement wrapper
library react_wrappers;
import 'dart:js';
import 'package:react/react_client.dart';
JsObject _React = context['React'];
Map _getInternal(JsObject jsThis) => jsThis[PROPS][INTERNAL];
@greglittlefield-wf
greglittlefield-wf / hipchat_mod.sh
Created July 22, 2015 17:47
HipChat CSS mod for message list styling improvements
#!/bin/bash
set -e
#########################################################
#
# HipChat CSS mod for message list styling improvements
#
# Hack at your own risk
#
#########################################################
/* User styles for hiding empty labels fields in the UIP backlog */
/* Don't display the "None" label placeholder */
.ghx-extra-field[data-tooltip="Labels: None"] {
display: none !important;
}
.ghx-plan-extra-fields-1 {
/* Remove extra margin below labels */
margin-bottom: 0 !important;
@greglittlefield-wf
greglittlefield-wf / main.dart.js
Created February 10, 2017 05:32
Excerpt of minified dart2js output with duplicate JS parameters
function MenuNavbarComponent(_menu_navbar$_renderedToolbarModelIds, _$MenuNavbarComponentImplMixin_$defaultConsumedProps, RenderPerformance__endMetric, RenderPerformance_performanceLabel, BatchedRedraws_shouldBatchRedraw, _FluxComponentMixin__subscriptions, _typedPropsCache, _props, _react$_state, _ref, _jsRedraw, _jsThis, _setStateCallbacks, _transactionalSetStateCallbacks, _prevState, _nextState, nextProps, $ti) {
this._menu_navbar$_renderedToolbarModelIds = _menu_navbar$_renderedToolbarModelIds;
this._$MenuNavbarComponentImplMixin_$defaultConsumedProps = _$MenuNavbarComponentImplMixin_$defaultConsumedProps;
this.RenderPerformance__endMetric = RenderPerformance__endMetric;
this.RenderPerformance_performanceLabel = RenderPerformance_performanceLabel;
this.BatchedRedraws_shouldBatchRedraw = BatchedRedraws_shouldBatchRedraw;
this._FluxComponentMixin__subscriptions = _FluxComponentMixin__subscriptions;
this._typedPropsCache = _typedPropsCache;
this._props = _p
@greglittlefield-wf
greglittlefield-wf / dart-lang_issue_28727_checker.sh
Last active February 10, 2017 18:10
Checks for the presence of the dart2js issue https://github.com/dart-lang/sdk/issues/28727 in a given compiled JS file, and sets the exit code if it is found.
#!/usr/bin/env bash
# Checks for the presence of the dart2js issue https://github.com/dart-lang/sdk/issues/28727
# in a given compiled JS file, and sets the exit code if it is found.
#
# For use on `pub build` output, or other output where the dart2js `minify` is enabled.
#
# Usage:
# ./dart-lang_issue_28727_checker.sh <pub_build_output.dart.js>
@Factory()
UiFactory<FooProps> Foo;
@Props()
class FooProps extends UiProps {}
@State()
class FooState extends UiState {
Object stateValue;
}
@greglittlefield-wf
greglittlefield-wf / install-dart-version.sh
Last active November 7, 2019 20:31
HomeBrew Dart version installer
#!/usr/bin/env bash
# install-dart-version.sh
#
# A script that installs a specific version of Dart using HomeBrew.
#
# Given a version, it'll first try to switch to a local install.
#
# If that version is not available, it will search through the Dart
# formula's history to find the right version.