Bash tab completion for the npx command
Save complete_npx
in your home folder and then source it on your .bash_profile
with:
. ~/complete_npx.sh
# allow `mount` cmd without password | |
echo "$USER ALL=NOPASSWD: /bin/mount" | (sudo su -c 'EDITOR="tee -a" visudo') | |
# add the mount directive to `fstab` | |
sudo mkdir -p /c | |
sudo sh -c "echo '/mnt/c /c none bind' >> /etc/fstab" | |
# update to `.bashrc` to auto mount at login | |
echo "sudo mount -a" >> ~/.bashrc | |
# now reload it | |
source ~/.bashrc |
# A bunch of the stuff above relies on this, especially the aliases. | |
[user] | |
# you probably want to change this bit. | |
name = isaacs | |
email = i@izs.me | |
signingkey = 0x6C481CF6 | |
[alias] | |
ci = commit | |
st = status | |
br = branch |
# Adapted from https://tinyapps.org/blog/nix/201701240700_convert_asciidoc_to_markdown.html | |
# Using asciidoctor 1.5.6.1 and pandoc 2.0.0.1 | |
# Install pandoc and asciidoctor | |
$ sudo apt install asciidoctor | |
$ sudo wget https://github.com/jgm/pandoc/releases/download/2.0.0.1/pandoc-2.0.0.1-1-amd64.deb | |
$ sudo dpkg -i pandoc-2.0.0.1-1-amd64.deb | |
# Convert asciidoc to docbook using asciidoctor |
# fetch the changes from the remote | |
git fetch origin | |
# show commit logs of changes | |
git log master..origin/master | |
# show diffs of changes | |
git diff master..origin/master | |
# apply the changes by merge.. |
I have spent quite a bit of time figuring out automounts of NFS shares in OS X...
Somewhere along the line, Apple decided allowing mounts directly into /Volumes should not be possible:
/etc/auto_master (see last line):
#
# Automounter master map
#
+auto_master # Use directory service
MIT License
Copyright (c) [year] [fullname]
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
# Install `dnsmasq` and configure for *.test domains | |
$ brew install dnsmasq | |
$ vim /usr/local/etc/dnsmasq.conf | |
# Reload configuration and clear cache | |
$ sudo launchctl unload /Library/LaunchDaemons/homebrew.mxcl.dnsmasq.plist | |
$ sudo launchctl load /Library/LaunchDaemons/homebrew.mxcl.dnsmasq.plist | |
$ dscacheutil -flushcache |
#!/bin/bash | |
# Creator: Phil Cook | |
# Modified: Andy Miller | |
# | |
# >>> IMPORTANT: Moved to: https://github.com/rhukster/sphp.sh | |
# >>> Kept here for legacy purposes | |
# | |
osx_major_version=$(sw_vers -productVersion | cut -d. -f1) | |
osx_minor_version=$(sw_vers -productVersion | cut -d. -f2) | |
osx_patch_version=$(sw_vers -productVersion | cut -d. -f3) |
Decompiled DLL with ILSpy to identify various commands.
Most commands can be found in DDM2._0_UX.CmdBackground.cmdService_DoWork
Write commands can be prefixed with int:command to specify which monitor to send the command to.
.\DDM.exe /0:writebrightnesslevel 50