Skip to content

Instantly share code, notes, and snippets.

View anthonybudd's full-sized avatar

Anthony C. Budd anthonybudd

View GitHub Profile
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'
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'),
// 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,
// 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,
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
},
<?php
WP_Route::get('/api/callback', function(){
update_option('last_called', current_time('mysql'));
});
<?php
Class Data extends WP_Model{
public $postType = 'data';
public $attributes = [
'foo',
'author',
];
<?php
Class ClearOrphanMetaAction extends WP_AJAX{
protected $action = 'clear-orphan-meta-action';
protected function run(){
global $wpdb;
$wpdb->get_results("
<?php
function onSave(){
$request = new WP_AJAX;
if($request->has('foo')){
// Do stuff
}
}
version: '3.3'
services:
wordpress:
depends_on:
- db
image: wordpress:latest
volumes:
- ./:/var/www/html
ports: