Friday, October 03, 2014

Things about developing on Mac that I constantly forget (hate)



Apache

Starting apache:

sudo apachectl start

Browsing to the right place


http://localhost/~username/

Monday, August 25, 2014

SCU-17 on Ubuntu

Configuring FLDIGI to work with SCU-17 on Ubuntu 13.10, I ran into a permissions issue.

Normal users can't access /dev/ttyUSBx You have to:
sudo chmod o+rwx /dev/ttyUSB0
sudo chmod o+rwx /dev/ttyUSB0 

Or (to make permanent) - from some sites on the internet (links lost - sorry):
sudo adduser youruser 
dialout sudo reboot

Friday, July 25, 2014

d3.js - Hello World

<!DOCTYPE html>
<html>
<head>
<!-- d3 uses extended ascii characters, so we HAVE to specify utf-8 -->
<meta charset="utf-8">
<script type="text/javascript" language="javascript" src="d3.v3.js"></script>
</head>
<body>
<script type="text/javascript">
// 1. Select a DOM element with a CSS selector
// 2. Create (and append) a new p DOM element, append it to body
// 3. Set the text of the DOM element p, to "Hello World!"
d3.select("body").append("p").text("Hello World!");
</script>
</body>
</html>

Sublime Text on MAC -


Go to end of line/begin of line, and select to end of line, begin of line defaults were driving me crazy. I wan home to move to begin of line, and end to go to end of line - not begin/end of document. Same deal for shift+home and shift+end - I want to select to begin/end of line.

Here's how to "fix" it - just add this to the keymaps.
{ "keys": ["home"], "command": "move_to", "args": {"to": "bol"} },
{ "keys": ["end"], "command": "move_to", "args": {"to": "eol"} },
{ "keys": ["shift+home"], "command": "move_to", "args": {"to": "bol", "extend": true} },
{ "keys": ["shift+end"], "command": "move_to", "args": {"to": "eol", "extend": true} },

Tuesday, April 01, 2014

macports - rsync blocked

Rsync is blocked at my work because stuff.

http://www.dreamchain.com/how-to-sync-mac-ports-without-rsync/ says:

If port 873 is blocked on your network and you need to sync MacPorts do this:
In /opt/local/etc/macports/sources.conf replace
rsync://rsync.macports.org/release/ports/ [default]
with
http://www.macports.org/files/ports.tar.gz [default]
and run
sudo port sync
instead of
sudo port selfupdate
MacPorts is now synching using http over port 80 instead of rsync over port 873.

Wednesday, March 19, 2014

Why I love Python

Reason #1

monkeys.sort(key=lambda monkey: monkey.height)


Reason #1.2

monkeys.sort(key=lambda monkey: (monkey.height, monkey.age))

Reason #1.3

monkeys.sort(key=lambda monkey: (monkey.height, monkey.age), reverse=True)