Skip to content

Instantly share code, notes, and snippets.

@mribbons
mribbons / Crafting_RecipeUIHelper.lua
Created July 15, 2021 04:09
OnPressCraftButton function
function OnPressCraftButton(button)
if not LOCAL_PLAYER.clientUserData.currentlyCrafting and SpamPrevent(itemRecipe.craftTime) and craftButton == button then
CraftProgress.progress = 0
craftingCount = 0
currentHealth = LOCAL_PLAYER.hitPoints
craftingTimer = itemRecipe.craftTime or 1
-- Send a crafting event to the server which checks the player's inventory for
ingredientsPanel.visibility = Visibility.FORCE_OFF
CraftProgress.visibility = Visibility.FORCE_ON
LOCAL_PLAYER.clientUserData.currentlyCrafting = true
@mribbons
mribbons / Makefile(yolo)
Created April 17, 2018 22:01
Makefile and package config file file darknet/yolo
GPU=1
CUDNN=0
OPENCV=1
OPENMP=0
DEBUG=0
#ARCH= -gencode arch=compute_30,code=sm_30 \
-gencode arch=compute_35,code=sm_35 \
-gencode arch=compute_50,code=[sm_50,compute_50] \
-gencode arch=compute_52,code=[sm_52,compute_52]
@mribbons
mribbons / plugin.xml
Created March 7, 2016 11:00
rs30 test plugin
<?xml version='1.0' encoding='utf-8'?>
<!--
This file is part of Apache Cordova Barcode Scanner Plugin for Cipherlab RS30,
which shall be referred to as "the Software"
The Software is authored by Michael Ribbons who shall be referred to as "the Author".
The MDR License (MDR)
Copyright (c) 2015 Michael Ribbons
Use of the Software is granted on a case by case basis.
@mribbons
mribbons / MainActivity.java
Created February 11, 2016 01:00
RS30_ReaderSample MainActivity.Java dated 30/11/2015
package com.example.readersample;
import com.cipherlab.barcode.*;
import com.cipherlab.barcode.decoder.*;
import com.cipherlab.barcode.decoderparams.*;
import com.cipherlab.barcodebase.*;
import android.app.Activity;
import android.content.BroadcastReceiver;
import android.content.Context;
gem install spree_cmd
rails new _3.2.13_ my_store
cd my_store
spree_cmd . -A
Process fails with gem deps issues during bundle install "."
Modify Gemfile,
change gem "spree" to
context "create order" do
current_api_user = Spree.user_class.new(:email => "spree@example.com")
#current_api_user.email =
current_api_user.generate_spree_api_key!
#current_api_user.save
puts "User: #{current_api_user.inspect}"
it "can create an order" do