This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/wordpress/wp-content/themes/wp-content/uploads/* | |
/wordpress/wp-content/themes/rip-it/ ## THIS SHOULD BE YOUR THEME NAME |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var path = require("path"); | |
// Set your theme name here | |
const THEME = "rip-it"; | |
const PATH = "/app"; | |
// Export config | |
module.exports = { | |
"port": "4000", // Port to run on | |
"root": path.resolve(`${PATH}/wp-content/themes/${THEME}`), // Where to serve from |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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": |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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"]; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/* | |
------------------------------------------ | |
| publish:void (-) | |
| | |
| Publishes the content | |
------------------------------------------ */ | |
function publish(){ | |
foreach( $this->settings["content"] as $content ){ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[{ | |
"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", |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
this._vl53l0x.setSignalRateLimit(.05, () => { | |
_this._vl53l0x.startCapture(); | |
}); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
"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 file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
------------------------------------------ | |
| 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 |