Skip to content

Instantly share code, notes, and snippets.

@chase
chase / main.js
Last active February 18, 2025 17:20
Electron 34.2.0 crash reproduction
const { app, BrowserWindow } = require('electron');
app.whenReady().then(async () => {
const win = new BrowserWindow({
width: 800,
height: 600,
show: false,
webPreferences: {
offscreen: true,
},
@chase
chase / lok-prereqs.sh
Created July 15, 2024 09:17
lok-prereqs.sh
apt-get install -y --no-install-recommends \
git \
build-essential \
zip \
nasm \
python3 \
python3-dev \
autoconf \
gperf \
xsltproc \
'use strict';
// Authored 2018-10-26 Chase Colman
var Util = (function() {
/**
* combinate visitor callback
* @callback Util~combinateCallback
* @param {[]} combination - currently visited combination
* @return {boolean} - terminates combinate if true
*/
@chase
chase / gist:cc980da37005dc0d48bed7b3cdd9f4d5
Created October 5, 2016 20:14
Jest Failed Test Output
FAIL src/renderers/shared/fiber/__tests__/ReactTopLevelFragment-test.js
● ReactTopLevelFragment › should render a simple fragment at the top of a component
ReferenceError: shouldTrackSideEffects is not defined
at deleteRemainingChildren (src/renderers/shared/fiber/ReactChildFiber.js:76:8)
at reconcileChildFibers (src/renderers/shared/fiber/ReactChildFiber.js:767:12)
at reconcileChildrenAtPriority (src/renderers/shared/fiber/ReactFiberBeginWork.js:83:30)
at reconcileChildren (src/renderers/shared/fiber/ReactFiberBeginWork.js:71:5)
at updateHostComponent (src/renderers/shared/fiber/ReactFiberBeginWork.js:285:7)
@chase
chase / nginx-custom-build.sh
Created March 25, 2016 19:22
Build Ubuntu or Debian packages for nginx with custom patches, configs, and name suffixes in one command
#!/bin/bash
# Author: Alexander Rodin <[email protected]>
# License: MIT
BUILD_DIR=build
while getopts "hp:s:r:b:o:c:n" opt; do
case $opt in
h)
echo "Usage: $0 [options]"
@chase
chase / .eslintrc
Created September 5, 2015 06:33
Import Plugin Breaking on Spread
{
"parser": "babel-eslint",
"plugins": [
"react",
"import"
],
"env": {
"browser": true,
"node": true
},
@chase
chase / .eslintrc
Created July 19, 2015 15:49
Import errors
{
"plugins": ["import"],
"ecmaFeatures": {
"jsx": true,
"modules": true
},
"env": {
"browser": true,
"node": true,
"es6": true
@chase
chase / fix-pkm.sh
Last active August 29, 2015 14:18
Fix Mono KPM on Linux (Add MS Certs)
# kpm restore whines about failing to write some headers, here's the non-obvious fix:
# Add Microsofts poorly signed certificates!
sudo certmgr -ssl -m https://go.microsoft.com
sudo certmgr -ssl -m https://nugetgallery.blob.core.windows.net
sudo certmgr -ssl -m https://nuget.org
mozroots --import --sync
[Unit]
Description=Fix trackpad after resume
After=suspend.target
After=hibernate.target
[Service]
User=%I
Type=simple
Environment=DISPLAY=:0
ExecStart=/usr/bin/xinput -enable bcm5974
@chase
chase / ansible.snippets
Last active August 29, 2015 14:09
snippet_gen generated Snipmate file for ansible
snippet rollbar_deployment
rollbar_deployment:
environment: ${1:# REQUIRED}
token: ${2:# REQUIRED}
revision: ${3:# REQUIRED}
comment: ${4}
rollbar_user: ${5}
url: ${6:https://api.rollbar.com/api/1/deploy/}
user: ${7}
validate_certs: ${8:#yes|no}