Skip to content

Instantly share code, notes, and snippets.

View DrewDahlman's full-sized avatar

Drew Dahlman DrewDahlman

View GitHub Profile
<key>NSAppTransportSecurity</key>
<dict>
<key>NSExceptionDomains</key>
<dict>
<key>laser1.local</key>
<dict>
<key>NSIncludesSubdomains</key>
<true/>
<key>NSTemporaryExceptionAllowsInsecureHTTPLoads</key>
<true/>
// Added to the ViewController.swift to ignore SSL warnings.
func webView(webView: WKWebView, didReceiveAuthenticationChallenge challenge: URLAuthenticationChallenge,
completionHandler: (URLSession.AuthChallengeDisposition, URLCredential?) -> Void) {
}
/*
------------------------------------------
| setSignalRateLimit:bool (-)
|
| Set the return signal rate limit check value in units of MCPS (mega counts
| per second). "This represents the amplitude of the signal reflected from the
| target and detected by the device"; setting this limit presumably determines
| the minimum measurement necessary for the sensor to report a valid reading.
|
| Setting a lower limit increases the potential range of the sensor but also
"use strict"
/*
Copyright (c) 2017. All Rights Reserved.
Author: Drew Dahlman - Legwork Studio.
VL53L0X API Wrapper ported to tessel. This acts as a simple wrapper for the VL53L0X Time Of Flight Sensor.
Ported from https://github.com/pololu/vl53l0x-arduino
this._vl53l0x.setSignalRateLimit(.05, () => {
_this._vl53l0x.startCapture();
});
[{
"ID": 16,
"post_author": "1",
"post_date": "2018-01-14 20:01:58",
"post_date_gmt": "2018-01-14 20:01:58",
"post_content": "",
"post_title": "X Files",
"post_excerpt": "",
"post_status": "publish",
"comment_status": "closed",
<?php
/*
------------------------------------------
| parsePost:array (-)
|
| Parses a post object recursively.
|
| @post:obj - A wordpress post object
| @content:array - Array for content
| @nested:bool - Flag for 1 level deep nesting
<?php
/*
------------------------------------------
| publish:void (-)
|
| Publishes the content
------------------------------------------ */
function publish(){
foreach( $this->settings["content"] as $content ){
<?php
include_once(dirname(__FILE__) . "/s3.php");
class Uploader {
var $settings;
var $file;
public function __construct( $file_name, $tmp_file, $dest ){
$this->settings["bucket"] = get_site_option("tantan_wordpress_s3")["bucket"];
@DrewDahlman
DrewDahlman / page-builder-template.php
Last active April 24, 2019 13:23
Sample ACF page builder switch statement
<?php
while( have_rows('page_content')): the_row();
switch(get_row_layout()){
case "copy_&_image":
include("blocks/copy.php");
break;
case "single_column":
include("blocks/single.php");
break;
case "image_gallery":