Skip to content

Instantly share code, notes, and snippets.

niftylettuce / .gitattributes
Created May 20, 2020 — forked from Yousha/.gitattributes
.gitattributes for Android(Java/C++) developers.
View .gitattributes
* text=auto
###### Git
.gitattributes text
.gitignore text
.gitconfig text
.gitmodules text
##### Windows
*.bat text eol=crlf
niftylettuce /
Last active Sep 16, 2019
macOS - dnsmasq + dnscrypt-proxy + Cloudflare

macOS - dnsmasq + dnscrypt-proxy + Cloudflare

  1. Install dnscrypt-proxy and dnsmasq:

    brew install dnscrypt-proxy
    brew install dnsmasq
  2. Replace contents of /usr/local/etc/dnscrypt-proxy.toml (see below file dnscrypt-proxy.toml)

niftylettuce / forwarder.js
Created May 5, 2019 — forked from andris9/forwarder.js
Process emails without data loss
View forwarder.js
'use strict';
// $ npm install nodemailer mailsplit libmime
// $ node forwarder.js
const nodemailer = require('nodemailer');
const mailsplit = require('mailsplit');
const libmime = require('libmime');
const Transform = require('stream').Transform;
niftylettuce /
Created Jan 24, 2019
scraper for ImTheSushi
npm install got cheerio


yarn add got cheerio
niftylettuce / file.js
Created Sep 25, 2018
I wrote a quick Node.js script to automate the conversion of password store naming conventions from `pass` ( into a more organized format. This is especially useful when importing 🎉
View file.js
const fs = require('fs');
const { promisify } = require('util');
const childProcess = require('child_process');
const { URL } = require('url');
const exec = promisify(childProcess.exec, childProcess);
(async () => {
const ls = await exec(`ls -al ~/.password-store | grep '^-' | awk '{print $9}'`);
const lines = ls.stdout.trim().split('\n').filter(line => line.endsWith('.gpg')).map(line => line.replace('.gpg', ''));
niftylettuce /
Last active Nov 15, 2018
Go to <> and search for "Debian", then follow script
niftylettuce /
Last active Nov 16, 2020
How to Enable Wi-Fi on MacBook, Mac Mini, MacBook Air for Ubuntu/Linux/Debian/Mint/Mate OS ---- If you liked this, check out my email forwarding service at 🎉 🎉 🎉

How to Enable Wi-Fi on MacBook, Mac Mini, MacBook Air for Ubuntu/Linux OS

By default older Mac computer models have driver issues with the Broadcom Wi-Fi chip. Most instructions online (such as this one from the official Ubuntu docs @ suggest to use sudo apt-get and install these packages from the PPA.

BUT you don't have Internet so you can't use apt-get! Instead you can use a different computer to download the packages, then transfer them over.

In the instructions below, you will need to replace sid in the download URL's with the proper version of Debian your version of Ubuntu/Linux is using. To find which version you should use, you can view the chart at If you're using jessie for example, then replace all sid with jessie in the links below.

  1. Download b43-fwcutter @ (*
niftylettuce /
Created Sep 27, 2017
High CPU Usage on macOS from videosubscriptionsd Process

I ran log and grepped for "videosubscriptionsd" process. I found that it seemed near every log output for it there was Dropbox referenced either above or below. After stopping Dropbox, the problem went away.

Dropbox: (LaunchServices) [ .launchservices.default] Local database thinks system build version is <private>, but the OS really is <private>.

Right above that I got this line:

videosubscriptionsd: Received distnoted matching event
View .bashrc.patch
< case $- in
< *i*) ;;
< *) return;;
< esac
> # case $- in
> # *i*) ;;
> # *) return;;
> # esac
View ecosystem.json
"apps": [
"name": "app",
"script": "app.js",
"exec_mode": "cluster",
"instances": "max",
"env_production": {
"NODE_ENV": "production"
You can’t perform that action at this time.