Skip to content

Instantly share code, notes, and snippets.

View DrewDahlman's full-sized avatar

Drew Dahlman DrewDahlman

View GitHub Profile
// Added to the ViewController.swift to ignore SSL warnings.
func webView(webView: WKWebView, didReceiveAuthenticationChallenge challenge: URLAuthenticationChallenge,
completionHandler: (URLSession.AuthChallengeDisposition, URLCredential?) -> Void) {
}
<key>NSAppTransportSecurity</key>
<dict>
<key>NSExceptionDomains</key>
<dict>
<key>laser1.local</key>
<dict>
<key>NSIncludesSubdomains</key>
<true/>
<key>NSTemporaryExceptionAllowsInsecureHTTPLoads</key>
<true/>
this._readRegisters(REGISTRY.RESULT_RANGE_STATUS, 16, (err, data) => {
var _dis = (data.readInt16BE(8) + 10);
this.emit('laser', _dis);
});
const REGISTRY = require('./registry');
class i2cInterface {
/*
------------------------------------------
| construct:void (-)
------------------------------------------ */
constructor(){
this._readRegisters( REGISTRY.OSC_CALIBRATE_VAL, 16, (err, data) => {
exports.I2C_ADDR = 0x29;
exports.SYSRANGE_START = 0x00;
exports.SYSTEM_THRESH_HIGH = 0x0C;
exports.SYSTEM_THRESH_LOW = 0x0E;
exports.SYSTEM_SEQUENCE_CONFIG = 0x01;
exports.SYSTEM_RANGE_CONFIG = 0x09;
exports.SYSTEM_INTERMEASUREMENT_PERIOD = 0x04;
nathantech:
are none of the Denver companies offering relocation expenses?
marc:
i dont think Denver is that desperate for engineers, but probably on a case by case basis
nathantech:
SF companies offer relocation a ton
nathantech:
/*
DirectionJS
For all your direction needs
Available Events:
@drag_start - When drag starts
@drag_end - When drag ends
@dragging - Dragging is happening
chatCommands: {
unknown: function(e) {
this.addSystemMessage('"/' + e + '" is not a command')
},
help: function() {
this.addSystemMessage("Welcome to Robin."), this.addSystemMessage("Be sure to use the buttons in the sidebar to vote on the future of the room before the polls are closed."), this.addSystemMessage("Non-votes and abstentions will be counted as votes to abandon."), this.addSystemMessage("We do hope you enjoy the discussion.")
},
commands: function() {
this.addSystemMessage("/vote abandon - vote to abandon"), this.addSystemMessage("/vote stay - vote to stay"), this.addSystemMessage("/vote grow - vote to grow"), this.addSystemMessage("/whois <user_in_room> - provide information about <user_in_room>")
},
@DrewDahlman
DrewDahlman / members.json
Created March 25, 2016 01:01 — forked from drewhutchison/members.json
denver-devs rolodex schema proposed draft
[
{
"picture": "http://placehold.it/32x32",
"website": "https://example.com",
"name": {
"first": "Amber",
"last": "Aguilar"
},
"employer": "OVIUM",
"email": "[email protected]",
@DrewDahlman
DrewDahlman / puzzle.md
Last active August 16, 2017 22:14
Pirates Puzzle

A pirate walks into a bar...

You must hurry to find Professor Boolean's secret lab. You fear it may be too late.

Rumor has it that one of the pirates in this tavern knows where it is. There's a whole row of them seated at the bar. You start by talking to the pirate seated on the left-most barstool. However, the pirate redirects you to another pirate. Fine... you go to talk to that one. To your great annoyance, that pirate redirects you to yet another pirate! And on and on it goes. Is there no end to this madness? You notice each pirate has a number tattooed on his arm and decide to ID each man by his number. Each pirate redirects to a different pirate, other than himself. Because of this, it is guaranteed that you will start going in loops talking to them.

Write a function answer(numbers) which returns the number of pirates which form a loop, given that you start by talking to the left-most pirate, 0. numbers will be an array of non-negative integers such that number[m] is the