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
const Scape = require('scape-js') | |
const fs = require('fs') | |
var scape = new Scape('YOUR_API_KEY') | |
var image = fs.readFileSync('./image.png'); | |
scape.upload(image, { | |
bucket_id: '00ce6d6a-ea29-4840-9b5d-cd1f6ae3bc6b' |
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
const TPS = require('3ps-js') | |
const fs = require('fs') | |
var tps = new TPS('YOUR_API_KEY') | |
tps.components.create({ | |
name: 'Dice', | |
group_id: '00ffedbb-ff29-5138-9b5d-cd1f6ae3bc6b', | |
is_public: false, | |
stl: fs.readFileSync('./dice.stl'), |
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
// Programmer's dice | |
// https://www.thingiverse.com/thing:1958065 | |
var diceComponent = await Component.create({ | |
id: uuidv4(), | |
created_by: 'aaaaaaaa-9a34-4466-ba4c-46438def7d7f', // Dont change | |
group_id: '00000000-9a34-4466-ba4c-46438def7d7f', // Dont change | |
image: 'https://3ps-media.ideea.io/media/bolt.jpg', | |
is_public: 1, |
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
// Programmer's dice | |
// https://www.thingiverse.com/thing:1958065 | |
var diceComponent = await Component.create({ | |
id: uuidv4(), | |
created_by: 'aaaaaaaa-9a34-4466-ba4c-46438def7d7f', // Dont change | |
group_id: '00000000-9a34-4466-ba4c-46438def7d7f', // Dont change | |
image: 'https://3ps-media.ideea.io/media/bolt.jpg', | |
is_public: 1, |
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
axios({ | |
url: 'localhost:7777/api/v1/channel/1/messages', | |
method: 'post', | |
data: { | |
message_id: '2kkun2k98fkxhfu8sf2444', | |
message: 'echo', | |
type: 'text', | |
channel: 'presence-lexi-2', | |
channel_id: 1 | |
}, |
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 | |
WP_Route::get('/api/callback', function(){ | |
update_option('last_called', current_time('mysql')); | |
}); |
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 | |
Class Data extends WP_Model{ | |
public $postType = 'data'; | |
public $attributes = [ | |
'foo', | |
'author', | |
]; |
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 | |
Class ClearOrphanMetaAction extends WP_AJAX{ | |
protected $action = 'clear-orphan-meta-action'; | |
protected function run(){ | |
global $wpdb; | |
$wpdb->get_results(" |
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 | |
function onSave(){ | |
$request = new WP_AJAX; | |
if($request->has('foo')){ | |
// Do stuff | |
} | |
} |
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
version: '3.3' | |
services: | |
wordpress: | |
depends_on: | |
- db | |
image: wordpress:latest | |
volumes: | |
- ./:/var/www/html | |
ports: |