Skip to content

Instantly share code, notes, and snippets.

@joewashere
joewashere / 0_reuse_code.js
Last active August 29, 2015 14:16
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
@joewashere
joewashere / parse.php
Created August 16, 2015 21:11
DHL Global Mail WTB to Miva XML Provisioning
<?php
$row = 1;
$countries = array('CA','AD','AE','AF','AG','AI','AL','AM','AN','AO','AR','AT','AU','AW','AZ','BA','BB','BD','BE','BF','BG','BH','BI','BJ','BL','BM','BN','BO','BR','BS','BT','BW','BY','BZ','CC','CD','CF','CG','CH','CI','CK','CL','CM','CN','CO','CR','CV','CX','CY','CZ','DE','DJ','DK','DM','DO','DZ','EC','EE','EG','EH','ER','ES','ET','FI','FJ','FK','FM','FO','FR','GA','GB','GD','GE','GF','GH','GI','GL','GM','GN','GP','GQ','GR','GS','GT','GW','GY','HK','HN','HR','HT','HU','ID','IE','IL','IM','IN','IO','IQ','IS','IT','JM','JO','JP','KE','KG','KH','KI','KM','KN','KR','KW','KY','KZ','LA','LB','LC','LI','LK','LR','LS','LT','LU','LV','LY','MA','MC','MD','ME','MF','MG','MH','MK','ML','MN','MO','MQ','MR','MS','MT','MU','MV','MW','MX','MY','MZ','NA','NC','NE','NF','NG','NI','NL','NO','NP','NR','NU','NZ','OM','PA','PE','PF','PG','PH','PK','PL','PM','PN','PS','PT','PW','PY','QA','RE','RO','RS','RU','RW','SA','SB','SC','SE','SG','SH','SI','SJ','SK','SL','SM','SN','SO','SR','ST','SV','SZ','TC','TD','TF','
<?php
require __DIR__ . '/vendor/autoload.php';
use pdeans\Miva\Provision\Manager as Provision;
$store_code = 'PS';
$url = 'http://www.example.com/mm5/json.mvc?Function=Module&Module_Code=remoteprovisioning&Module_Function=XML';
$token = '12345';
$records = 5;
{
"globals": {
"jQuery": true,
"$": true
},
"env": {
"browser": true,
"node": true
},
"rules": {
// SublimeLinter Settings - User
{
"linters": {
"eslint": {
"args": "-c '%APPDATA%/Sublime Text 3/.eslintrc'"
}
}
}
@joewashere
joewashere / product_rating.vue
Created September 1, 2019 22:19
A simple component for product ratings
// Product Star Rating Display
Vue.component("prod-rating", {
props: ["rating"],
data(){
return {
stars: []
}
},
mounted: function () {
let ratingTracker = this.rating;
// Outside Class
window.addEventListener('keydown', (e) => {
e.preventDefault();
player.idletime = 0;
switch(e.code){
case "KeyS":
case "ArrowDown":
// Move Player Down
break;
case "KeyW":