Skip to content

Instantly share code, notes, and snippets.

@joeljeske
joeljeske / lint-staged-precommit.sh
Last active April 12, 2018 16:29
Lint Staged Handle Partially Staged Files
#!/bin/bash
NPM_COMMAND=$1
STAGED_FILE=$2
IS_PARTIALLY_STAGED=$(git diff --name-only "$STAGED_FILE")
if [[ "$IS_PARTIALLY_STAGED" != "" ]];
then
# If the file is partially changed, we need get the hash so we can see if it changed later
PRE_LINT_HASH=$(git hash-object "$STAGED_FILE")
@joeljeske
joeljeske / index.html
Last active February 25, 2019 23:10
Reproduce Chrome 72.x Android Layout CPU Spike
<!DOCTYPE html>
<html>
<head>
</head>
<body>
<span id="test"></span>
<p>
Click on the buttons below to use 'n' number of children in the inline container.
<br />
On my test device, 20-23 children made the CPU spike
@joeljeske
joeljeske / coder-meta.yml
Last active June 25, 2020 19:34
che-registry
apiVersion: v2
publisher: cdr
name: code-server
version: 3.4.1
type: Che Editor
displayName: code-server
title: Visual Studio Code - Web (code-server)
description: An open source distribution of Visual Studio Code as a cloud IDE
icon: https://raw.githubusercontent.com/sr229/discord-open-source/master/logos/code-server.svg
category: Editor
@joeljeske
joeljeske / exec-log.react.txt
Created September 2, 2020 15:18
React-Cache-Miss-Build-Buddy
command_args: "bazel-out/host/bin/external/npm/rollup/bin/rollup.sh"
command_args: "index=bazel-out/k8-fastbuild/bin/npm/_react__entry_point.js"
command_args: "--output.dir"
command_args: "bazel-out/k8-fastbuild/bin/npm/react__bundle"
command_args: "--format"
command_args: "system"
command_args: "--silent"
command_args: "--config"
@joeljeske
joeljeske / patch-android-studio-check.js
Created April 2, 2018 14:40
Fixes android plugin install that fail because it cannot find AndroidManifest.xml
/**
* This hook overrides a function check at runtime. Currently, cordova-android 7+ incorrectly detects that we are using
* an eclipse style project. This causes a lot of plugins to fail at install time due to paths actually being setup
* for an Android Studio project. Some plugins choose to install things into 'platforms/android/libs' which makes
* this original function assume it is an ecplise project.
*/
module.exports = function(context) {
if (context.opts.cordova.platforms.indexOf('android') < 0) {
return;
}