Skip to content

Instantly share code, notes, and snippets.

View Kayakbabe's full-sized avatar

Kelly Eberhard Allen Kayakbabe

View GitHub Profile
@gandy92
gandy92 / write_spool_nfc.py
Created May 16, 2020 07:47
Python 3 script to demonstrate writing custom data to Ultimaker filament NFC tag
# -*- coding: utf-8 -*-
# https://github.com/BrianHVB/intro-to-smartcard-development#heading--python-example-1
#
# required packages: pyscard
#
from smartcard.Exceptions import NoCardException
from smartcard.System import *
from smartcard import util
from ums5 import MyFilamentSpool, decode
import uuid
@gandy92
gandy92 / spool.py
Created May 14, 2020 05:04
Python3 code to demonstrate how the data on the NFC tag on an Ultimaker material spool is organised
# -*- coding: utf-8 -*-
#
# required packages: ndeflib, crc8
#
from crc8 import crc8
import ndef
import uuid
class UltimakerMaterialRecord(ndef.record.GlobalRecord):
@steveosoule
steveosoule / master_provide.xml
Created October 18, 2018 20:18
Miva - Master XML Provide
<Provision oncomplete="archive|delete">
<Domain>
<Store_Create>
<Code>GES</Code>
<Name>Garth's Equipment Shoppe</Name>
<Manager>admin</Manager>
<LicenseNumber>mvsup-3NMBCP01101</LicenseNumber>
<Owner>McCollough Enterprises</Owner>
<Email>noreply@miva.com</Email>
<Company>miva test</Company>
@kinlane
kinlane / Ecwid API.json
Created August 16, 2018 23:49
Ecwid API
{
"swagger": "2.0",
"info": {
"version": "1.0",
"title": "Ecwid API v3",
"description": "TODO: Add Description"
},
"host": "app.ecwid.com",
"basePath": "/api/v3/14732441",
"schemes": [
@tessguefen
tessguefen / diagtool.md
Last active July 18, 2018 21:07
Diagtool

Miva - Profiling and Diagnostic Process

logfile=diagtool.log
loglevel=144
logcookie=mivadiagtool
  • Visit page(s) that you're trying to troubleshoot
  • Download /private/mivadata/diagtool.log file
@imelgrat
imelgrat / check-youtube-id.php
Last active April 27, 2018 05:27
Verify whether a YouTube video exists using PHP and oEmbed status codes. Instead of actually fetching the video’s URL using a tool suchas a cURL, we can speed things up by just checking the response headers by using PHP’s get_headers() function. Full article: https://imelgrat.me/json-xml/oembed-protocol-embed-videos-news/
<?php
/**
* @author Ivan Melgrati
* @copyright 2018
*/
function YouTube_Check_ID($videoID)
{
$is_valid = true;
@steveosoule
steveosoule / quick-order-form.js
Created August 30, 2017 19:14
Miva - Quick Order Form
// ---- Quick OrderForm --- //
(function quick_order_form(){
var $button = $('#js-quick-add-button, .js-quick-add-button'),
form_selector = '.js-quick-add-form',
$container = $('.js-quick-add'),
doing_adpr = 0;
var init = function(){
$(document).on('submit', form_selector, function(e){
e.preventDefault();
<?xml version="1.0" encoding="UTF-8"?>
<module type="PYTHON_MODULE" version="4">
<component name="NewModuleRootManager">
<content url="file://$MODULE_DIR$" />
<orderEntry type="inheritedJdk" />
<orderEntry type="sourceFolder" forTests="false" />
</component>
<component name="TestRunnerService">
<option name="PROJECT_TEST_RUNNER" value="Unittests" />
</component>