See how a minor change to your commit message style can make you a better programmer.
Format: <type>(<scope>): <subject>
<scope>
is optional
import IOBluetooth | |
// See https://developer.apple.com/reference/iobluetooth/iobluetoothdevice | |
// for API details. | |
class BluetoothDevices { | |
func pairedDevices() { | |
print("Bluetooth devices:") | |
guard let devices = IOBluetoothDevice.pairedDevices() else { | |
print("No devices") | |
return |
You're taking your first steps into Ruby
A good introduction to programming in general. Easy on newer programmers.
$ uname -r
Once in a while, you may need to cleanup resources (containers, volumes, images, networks) ...
// see: https://github.com/chadoe/docker-cleanup-volumes
$ docker volume rm $(docker volume ls -qf dangling=true)
$ docker volume ls -qf dangling=true | xargs -r docker volume rm
I'm currently the lead instructor at Code Platoon and an instructor/developer at the Turing School of Software and Design.
I've been advocating the Fish shell and when the choice is up to me, I choose that for my students. Enough people ask about the decision, particularly in relation to the preinstalled Bash shell, that I figured it's worth laying out my reasoning.
# npm using https for git | |
git config --global url."https://github.com/".insteadOf git@github.com: | |
git config --global url."https://".insteadOf git:// | |
# npm using git for https | |
git config --global url."git@github.com:".insteadOf https://github.com/ | |
git config --global url."git://".insteadOf https:// |
First, check your current config (example output in homebrew.mxcl.postgresql.plist.xml
lower down in this gist):
cat ~/Library/LaunchAgents/homebrew.mxcl.postgresql.plist
Most importantly, note the -D /usr/local/var/postgres
argument.
Second, shut down your current PostgreSQL.
launchctl unload ~/Library/LaunchAgents/homebrew.mxcl.postgresql.plist
require "midi" | |
require "eventmachine" | |
# prompt the user to select an input and output | |
EventMachine.run do | |
@input = UniMIDI::Input.gets | |
@output = UniMIDI::Output.gets | |
EventMachine.set_timer_quantum(10); |