Skip to content

Instantly share code, notes, and snippets.

View amicoding
[2019-11-05T10:16:56-05:00] [2019-11-05T10:21:56-05:00]
[2019-11-05T01:15:54-05:00] [2019-11-05T01:31:55-05:00]
[2019-11-05T01:00:53-05:00] [2019-11-05T01:13:19-05:00]
brandonsimpson /
Last active Jun 6, 2020
Re-installing Git on Mac OSX with Brew

Re-installing Git on Mac OSX with Brew

This is helpful if you've previously installed git from source on OSX, and other compilers can't find the correct path. You need to remove the current version of git, then re-install with brew.

Uninstall git if installed manually

  1. Check which git you're running:
    which git
View Disable Device Enrollment Notification on

Disable Device Enrollment Notification on

Restart the Mac in Recovery Mode by holding Comment-R during restart

Open Terminal in the recovery screen and type

csrutil disable
rama982 / hosts_miui.txt
Last active Jun 6, 2020
Hosts for blocking MIUI from calling back home
View hosts_miui.txt
deviantony /
Last active Jun 6, 2020
Portainer HTTP API by example


This document presents a simple way to manage your Docker resource by using Portainer as a gateway (HTTP queries against the Portainer API).

The API documentation is available here:

WARNING: This documentation is valid for Portainer >= 1.18.0.

NOTE: I'm using httpie to execute HTTP queries from the CLI.

sgnl /
Last active May 4, 2020
Installing Postgres via Brew (OSX) (outdated see top most note)

Outdated note: the process is a lot easier now: after you brew install postgresql you can initialize or stop the daemon with these commands: brew services start postgresql or brew services stop postgresql.

new out put may look like

To have launchd start postgresql now and restart at login:
  brew services start postgresql
Or, if you don't want/need a background service you can just run:
  pg_ctl -D /usr/local/var/postgres start
# PyTorch code For implementing the mixture of softmaxes layer from
# "Breaking the Softmax Bottleneck: A High-Rank RNN Language Model"
context = self.fc(out)
# Non-log version
priors = F.softmax(context[:,-self.n_components:])
mixtures = torch.stack([priors[:,i].unsqueeze(1) * F.softmax(context[:, i * self.nClasses : (i + 1) * self.nClasses]) for i in range(self.n_components)],1)
out = torch.log(mixtures.sum(1))
glnds /
Last active May 21, 2020
Less Cheatsheet

Less Cheatsheet

less {filename}
SPACE forward one window
b backward one window
d forward half window
View wemos-d1-mini-esp8266-rfid-rc522.ino
Useful links*YKc8KpAfMrlhrOLmNjdRwQ.png (D1 full pinout)
d1 mini rc52 wiring
You can’t perform that action at this time.