Skip to content

Instantly share code, notes, and snippets.

Eric Eastwood MadLittleMods

Block or report user

Report or block MadLittleMods

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 cmder-restart-ssh-agent.md

Sometimes the Cmder SSH agent seems to be borked and anything you try to connect to just rejects. I often run into this when running an Ansible command on a remote host

ssh root@xx.xxx.xxx.xxx
root@xx.xxx.xxx.xxx: Permission denied (publickey).
ssh_exchange_identification: Connection closed by remote host

Fix

@MadLittleMods
MadLittleMods / manually-add-saved-password-to-chrome.md
Last active Mar 23, 2019
Manually add saved password to Chrome
View manually-add-saved-password-to-chrome.md

Manually add saved password to Chrome

Some apps don't have browser logins (mobile or desktop only apps) but you still want to manage your passwords in one place (Google Chrome).

Solution

Inspect the page and insert the following HTML <form> anywhere on the page. Then fill it out and submit 🤠

@MadLittleMods
MadLittleMods / webpack-ContextReplacementPlugin--contextModuleFactory-npe.md
Created Feb 1, 2019
webpack ContextReplacementPlugin -> Cannot read property 'contextModuleFactory' of undefined
View webpack-ContextReplacementPlugin--contextModuleFactory-npe.md

Thanks to https://tgarchive.ru/group/webpack_ru/2018-03-21/

I solved this by making sure only webpack v4 was in my dependencies (check package-lock.json). Before I had mixed webpack v1 and v4 and had this error when I was upgrading webpack, https://gitlab.com/gitlab-org/gitter/webapp/issues/2078

TypeError: Cannot read property 'contextModuleFactory' of undefined
    at ContextReplacementPlugin.apply (webapp\node_modules\webpack\lib\ContextReplacementPlugin.js:59:18)
    at Compiler.apply (webapp\node_modules\webpack-stream\node_modules\tapable\lib\Tapable.js:164:16)
    at WebpackOptionsApply.process (webapp\node_modules\webpack-stream\node_modules\webpack\lib\WebpackOptionsApply.js:62:18)
    at webpack (webapp\node_modules\webpack-stream\node_modules\webpack\lib\webpack.js:22:48)
View italki-963776-korean-csgo-notebook-2019-1-6.md

Gist created for https://www.italki.com/notebook/5796312/entry/963776

Thanks @Jeongwon 🐣, lots of learning! Here are notes for my own reference and some questions.

Is "하면서 놀다" normally how you would say you play a video game? Is "놀다" by itself just a less natural?

~(으)면서: To do two actions at the same time, https://www.howtostudykorean.com/unit-3-intermediate-korean-grammar/unit-3-lessons-59-66/lesson-62/#621

Correct name JaeHee -> 재희 and "vowel 여요" correction(vs "consonant 이에요")

View npm-5-8-0-macos-debug.log
16008 silly decomposeActions build css-color-function@1.3.3
16009 silly decomposeActions install css-color-function@1.3.3
16010 silly decomposeActions postinstall css-color-function@1.3.3
16011 silly decomposeActions finalize css-color-function@1.3.3
16012 silly decomposeActions refresh-package-json css-color-function@1.3.3
16013 silly decomposeActions fetch right-align@0.1.3
16014 silly decomposeActions extract right-align@0.1.3
16015 silly decomposeActions preinstall right-align@0.1.3
16016 silly decomposeActions build right-align@0.1.3
16017 silly decomposeActions install right-align@0.1.3
View npm-5-8-0-windows-10-debug.log
This file has been truncated, but you can view the full file.
22011 silly decomposeActions preinstall yargs@3.27.0
22012 silly decomposeActions build yargs@3.27.0
22013 silly decomposeActions install yargs@3.27.0
22014 silly decomposeActions postinstall yargs@3.27.0
22015 silly decomposeActions finalize yargs@3.27.0
22016 silly decomposeActions refresh-package-json yargs@3.27.0
22017 silly decomposeActions fetch defs@1.1.1
22018 silly decomposeActions extract defs@1.1.1
22019 silly decomposeActions preinstall defs@1.1.1
View beaglebone-black-unable-to-set-pwm-period.md

When using a small frequency value with analogWrite(pinString, dutyCycle, frequencyHz, callback), the following error can be thrown.

var b = require('bonescript');
b.pinMode('P9_14', b.OUTPUT);
b.analogWrite('P9_14', 0.5, 10, function(res) { console.log(JSON.stringify(res)); });
@MadLittleMods
MadLittleMods / streaming-endpoint-with-progress.js
Last active Sep 25, 2018
Barebones Express app for essentially multiple responses from one request (progress)
View streaming-endpoint-with-progress.js
const express = require('express');
const logger = require('morgan');
const app = express();
app.use(logger('dev'));
app.get('/', function (req, res) {
res.status(200).send(`
@MadLittleMods
MadLittleMods / docker-start-test-container-on-windows.bat
Last active Oct 7, 2017
`ssh-add ~/.ssh-from-host/github_rsa`
View docker-start-test-container-on-windows.bat
REM Share your host `~/.ssh` directory to `/root/.ssh-from-host`
REM You can use `ssh-add ~/.ssh-from-host/github_rsa` now
echo off
setlocal enableDelayedExpansion
set SSH_CERT_DIR=%userprofile:\=/%
set SSH_CERT_DIR=%SSH_CERT_DIR:C:/=//c/%
set SSH_CERT_DIR=%SSH_CERT_DIR%/.ssh/
REM echo %SSH_CERT_DIR%
View express-serve-targz-of-directory.js
const Promise = require('bluebird');
const path = require('path');
const fs = require('fs-extra');
const stat = Promise.promisify(fs.stat);
const glob = Promise.promisify(require('glob'));
const tarstream = require('tar-stream');
const zlib = require('zlib');
const express = require('express');
function targzGlobStream(globString, options) {
You can’t perform that action at this time.