These are some handy snippets to get common metrics for checking how active a software engineer is.
- How many pushes are made by the IC?
- How many reviews are made by the IC?
- How many comments are made by the IC?
#!/bin/bash | |
## define image directory | |
DIR=.build/src/webroot/uploads | |
## define image sizes | |
sizes=(320 640 1280) | |
## imagemagick function | |
## convert $1(image) $2(width) $3(newname) |
Scan for access points (run multiple times for more complete scan):
# connmanctl scan wifi
Scan completed for wifi
/* Better styles for embedding GitHub Gists */ | |
.gist{font-size:13px;line-height:18px;margin-bottom:20px;width:100%} | |
.gist pre{font-family:Menlo,Monaco,'Bitstream Vera Sans Mono','Courier New',monospace !important} | |
.gist-meta{font-family:Helvetica,Arial,sans-serif;font-size:13px !important} | |
.gist-meta a{color:#26a !important;text-decoration:none} | |
.gist-meta a:hover{color:#0e4071 !important} |
import Cocoa | |
protocol AXUIProtocol { | |
func AXUIWindowArray(processIdentifier pid:pid_t) -> [AXUIElement] | |
func AXUIWindowArray(bundleIdentifier bid:NSString) -> [AXUIElement] | |
} | |
extension AXUIProtocol { | |
func AXUIWindowArray(processIdentifier pid:pid_t) -> [AXUIElement] { | |
let windowList : UnsafeMutablePointer<AnyObject?> = UnsafeMutablePointer<AnyObject?>.alloc(1) |
(function x(){"use strict"; x = 1;}()); // TypeError | |
(function x(){x = 1; return x !== 1;}()); // write fails silently; function returns true | |
(function x(){"use strict"; x = (function(){throw 0;})();})() // Error 0 | |
// These three lines rely on ES6. | |
(function x(){const x = 1;})() // No-op. In particular, not a redeclaration of x. | |
(function (){"use strict"; const x = 1; x = 2;})() // TypeError | |
(function (){const x = 1; x = 2;})() // TypeError. contrast (function x(){x = 2;}()); |
Controlling your nodebot using a USB cable is great and all, and obviously you could shell out and grab a sparkcore or some other dedicated controller but what if you've got a standard arduino and you want to take an existing nodebot wireless?
Bluetooth is an option and there's this excellent JohnnyFive wiki entry that will help you there. Bluetooth can be a bit flaky though and it's range is pretty lousy. You can also look at things like XBees and what not using point to point serial, but these are expensive and very fiddly to get working.
Really, what we want is a method of transferring data over a nice, simple, standard method, requiring little configuration, low cost and we can utilise a whole stack of the code we've already produced.
Enter the WiFi232 module. These little beauties are [available from AliExpress for $12 each](http://www.aliexpress.com/item/USR-WIFI232-T-wifi-to-uart-tt
const mocks = Object.create(null); | |
global.mock = function (_mocks) { | |
Object.assign(mocks, _mocks); | |
}; | |
export async function resolve (specifier, context, parentResolve) { | |
if (mocks[specifier]) { | |
return { url: 'mock:' + specifier }; | |
} | |
return parentResolve(specifier, context); |
--- | |
# | |
# Ansible playbook: install Mosquitto from PPA on Ubuntu v201502131346 | |
# Louis T. Getterman IV (@LTGIV) | |
# www.GotGetLLC.com / www.opensour.cc | |
# | |
# Thanks to @jpmens for insight on cert locations ( https://twitter.com/jpmens/status/565513595644313600 ) | |
# | |
# Example Usage: | |
# [user@host ~$] ansible-playbook /etc/ansible/playbooks/ubuntu-mosquitto.yml --extra-vars 'target=nameFromHostsFile' |