Showing posts from 2016

simple angularjs 1.x webapp

Here's a very simple app using AngularJS 1.x.


Ignore how the first couple of lines in app.js work, and just use as is.Anything in index.html that starts with "ng-" is a "angular directive", fancy term for a placeholder. Angular repeatly scans the DOM for these, gulps them up and runs them. Sometimes it is just a div, sometimes the whole body. You decide how much of the DOM a directive needs to control. Try to keep it as small as possible.
Live app: (I hope)

Maybe try to play with app.js to see if you can add some functionality using m_words.

git: merge request

git checkout mastergit pullgit branch -b <mybranch><changes>git commit -am'My change commit'git push origin <mybranch>

Ubuntu LXD container: no IP address

sudo dpkg-reconfigure -p medium lxd Be very careful, this will wipe any existing lxc/lxd bridge you have and make your existing containers unreachable. So this is really only recommended if you are using LXD for the first time on your machine.

See comment section of

"This change was required to be able to decouple LXD from the old LXC tools, moving it onto its own bridge. The warning message was highlighting the reasons for that, the effect it would have on existing containers and how to configure it so things would work as usual."

openvpn confs - starpoint


port 1194 proto udp dev tun0 ca ca.crt cert server.crt key server.key # This file should be kept secret dh dh1024.pem server ifconfig-pool-persist ipp.txt push "route" push "route" push "route" push "route" push "route" push "route" push "route" push "route" push "route" push "route" push "route" push "route" push "route" push "route" push "route" client-to-client keepalive 10 120 tls-auth ta.key 0 # This file is secret comp-lzo max-clients 200 user nobody group…

gist of git rebase problem avoidance

"If you treat rebasing as a way to clean up and work with commits before you push them, and if you only rebase commits that have never been available publicly, then you’ll be fine. If you rebase commits that have already been pushed publicly, and people may have based work on those commits, then you may be in for some frustrating trouble, and the scorn of your teammates."

absolute necessities for technical teams of diverse personality types

change management for "real" using professional standards developed by large companies many government orgs use the standard existing tools may exist concepts definitely exist and are well documented repositories on all changed files who changed what when ability to lower repeated mistakes through good practices system for tracking pushes up environment chain dev -> qa -> staging -> prod garbage maintenance zero duplicate file name and/or paths requires code calling by old name/path be updated immediately process

Openvpn and unbound combined break dig command

when doing DNS lookup against remote unbound server over OpenVPN connectionresults not coming back, or say "reply from unexpected source" ping and ssh work fine

fix unbound.conf "interface" parameter -> local ip instead of ""replies will have the local ip and not the OpenVPN ip now
Sample reply when still broken:

;; reply from unexpected source:, expected

SSH config: command for bastion server proxying

Host IdentityFile ~/.ssh/mykey.pem User ec2-user ForwardAgent yes Host 10.* ProxyCommand ssh ec2-user@ nc %h 22 User ec2-user IdentityFile ~/.ssh/mykey.pem ForwardAgent yes

Ruby: multi-level hash keys trick

Ruby freakshow to allow multi-level hash keys to be set even if they have not been defined before. Feature!

m_entities = { |h, k| h[k] = }