Skip to content

Instantly share code, notes, and snippets.

laggingreflex laggingreflex

Block or report user

Report or block laggingreflex

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View ping.mjs
import { spawn } from 'child_process'
const cp = spawn('node', ['pong.mjs'], { shell: true })
cp.stdout.pipe(process.stdout)
cp.stderr.pipe(process.stderr)
process.stdin.pipe(cp.stdin)
@laggingreflex
laggingreflex / Synaptics.reg
Created Jan 25, 2019
Disable Smartsense on Synaptics Touchpad
View Synaptics.reg
Windows Registry Editor Version 5.00
; See https://superuser.com/questions/1163025/no-option-to-disable-smartsense-in-synaptics-touchpad-driver/1384982#1384982
[HKEY_LOCAL_MACHINE\SOFTWARE\Synaptics\SynTP\Defaults]
"PalmKms0"=dword:00000000
"PalmKms0g"=dword:00000000
"PalmKms0p"=dword:00000000
"PalmKms1"=dword:00000000
"PalmKms1g"=dword:00000000
@laggingreflex
laggingreflex / README.md
Created Dec 22, 2018
SSD M.2 vs HDD: Running npm install on a typically large NodeJS project
View README.md

HDD

[![][HDD_gif]][HDD_link] ~ 1 minute 26 sec

SSD

[![][SSD_gif]][SSD_link] ~ 20 sec

The node_modules in this project consisted of ~16k files and ~70MB

View index.js
const serve = require('webpack-serve');
serve({ config: {} });
@laggingreflex
laggingreflex / gist:df28777a34d61e9f16dbb5b6e8120a81
Created Mar 20, 2018
SpaceSniffer Script for exporting grouped-by-folder file report but with only folders >10GB & files >100MB
View gist:df28777a34d61e9f16dbb5b6e8120a81
if {<%isfile%>} == {true} ? {
if {<%disksizebytes%>} > {100000000} ?
{ [{leftpad{<%disksize%>}{ }{8}}] <%file%>{&br} }
}:{
if {<%containsfiles%>} == {true} ? {
if {<%disksizebytes%>} > {10000000000} ?
{ {&br}<%pathfile%> [<%disksize%>]{&br} }
}
}
View esm.js
"use strict";
const __non_webpack_module__ = module;
const __non_webpack_filename__ = __filename;
module.exports =
/******/ (function(modules) { // webpackBootstrap
/******/ // The module cache
/******/ var installedModules = {};
/******/
@laggingreflex
laggingreflex / markdown-js.html
Last active Mar 23, 2017
webpack bundles - difference between markdown-js vs marked - size comparison
View markdown-js.html
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>Webpack Bundle Analyzer</title>
<!-- viewer.js -->
<script>
@laggingreflex
laggingreflex / sort.js
Created Nov 16, 2016
Sort github comments by reactions
View sort.js
(() => {
const q = (e, s) => e.querySelector(s);
const qA = (e, s) => e.querySelectorAll(s);
const num = e => parseInt(e.nextSibling.wholeText.trim())
const d = document.querySelector('.js-discussion.js-socket-channel');
/* uncomment one of these to sort by */
const sortBy = '+1';
// const sortBy = '-1';
// const sortBy = 'smile';
@laggingreflex
laggingreflex / Readme.md
Created Aug 27, 2016
[Question] How to install ST3 on WSL? It gives this error
View Readme.md

I tried installing

sudo add-apt-repository ppa:webupd8team/sublime-text-3
sudo apt-get update
sudo apt-get install sublime-text-installer

but it gives error (full error below)

... (skipping lines that were ok)
Setting up sublime-text-installer (3114-2~webupd8~0) ...
@laggingreflex
laggingreflex / Readme.md
Created Jul 30, 2016
UglifyJsPlugin is preventing generation of sourcemaps in Webpack 2
View Readme.md

Install & run:

npm i webpack@2.1.0-beta.20
./node_modules/.bin/webpack

Output with UglifyJsPlugin

           Asset     Size  Chunks             Chunk Names
    index.min.js  2.59 kB       0  [emitted]  main
You can’t perform that action at this time.