Skip to content

Instantly share code, notes, and snippets.

View josephclaytonhansen's full-sized avatar
👨‍💻
creating a better boid simulation

Joseph Hansen josephclaytonhansen

👨‍💻
creating a better boid simulation
View GitHub Profile
import math
def HexFileToPixeloramaPalette(file, name):
name = '"' + name + '"'
first = """[gd_resource type="Resource" load_steps=15 format=2]
[ext_resource path="res://src/Palette/PaletteColor.gd" type="Script" id=1]
[ext_resource path="res://src/Palette/Palette.gd" type="Script" id=2]
"""
@josephclaytonhansen
josephclaytonhansen / script.js
Created February 4, 2022 01:54
WooCommerce change default customer checkout state (DO NOT USE)
const TO_NAME = 1;
const TO_ABBREVIATED = 2;
function convertRegion(input, to) {
var states = [
['Alabama', 'AL'],
['Alaska', 'AK'],
['American Samoa', 'AS'],
['Arizona', 'AZ'],
['Arkansas', 'AR'],
@josephclaytonhansen
josephclaytonhansen / paste.html
Created January 18, 2022 18:50
Javascript Dynamic Hours (ideal for Wordpress)
<script>
window.onload = function() {
var today = new Date();
var day = today.getDay();
if (today.getMinutes() > 9) {
var hourm = today.getHours() + "." + today.getMinutes();
} else {
var hourm = today.getHours() + ".0" + today.getMinutes();
}
var time_int = parseInt(hourm, 10);
@josephclaytonhansen
josephclaytonhansen / email_insert.html
Created April 7, 2021 19:03
Email Rating System (for work)
<style>
.rating {
float: left;
}
.rating:not(:checked)>input {
position: absolute;
top: -9999px;
clip: rect(0, 0, 0, 0);
}
# https://blender.stackexchange.com/q/57306/3710
bl_info = {
"name": "Add-on Template",
"description": "",
"author": "p2or",
"version": (0, 0, 3),
"blender": (2, 80, 0),
"location": "3D View > Tools",
"warning": "", # used for warning icon and text in addons panel