Skip to content

Instantly share code, notes, and snippets.

@MohHeader
MohHeader / idev.rb
Created May 23, 2024 08:25
iDev integration - Custom Shopping Cart
# Prepare order number
ordernum = "NWHK-#{_data[:hook].id}"
params = {
ip_address: _data[:visitor_ip], # User's IP
idev_saleamt: [_data[:price], _data[:months]*5].max , # Sales Amount
idev_ordernum: ordernum # Order Number
}
# Add Coupone Code if Exist
<div id="genie-component" style="width: 450px;margin: auto;"></div> <!-- the HTML DOM to replace with the Genie Search Bar -->
<!-- Add the following inside the <body> tag -->
<script src="https://genie-ai.fra1.digitaloceanspaces.com/js/genie.js"></script>
<script>
initGenie("genie-component") // pass the DOM id
</script>
@MohHeader
MohHeader / QuadTreeTest.cs
Last active May 1, 2022 17:39 — forked from DGoodayle/QuadTreeTest.cs
Quadtree in Unity
using UnityEngine;
using System.Collections;
public class QuadTreeTest : MonoBehaviour {
public class TestObject : IQuadTreeObject{
private Vector3 m_vPosition;
public TestObject(Vector3 position){
m_vPosition = position;
}
public Vector2 GetPosition(){
@MohHeader
MohHeader / radioNizer.html
Last active September 2, 2015 06:08
Use ul,li to create a Radio-Button-like input
<ul id="ul" data-name="name">
<li data-value="1">1</li>
<li data-value="2">2</li>
<li data-value="3">3</li>
</ul>
<script type="text/javascript">
$.extend($.fn, {
radioNizer: function () {
this.each(function () {