Skip to content

Instantly share code, notes, and snippets.

View JokerMartini's full-sized avatar
😀

John Martini JokerMartini

😀
View GitHub Profile
@rxaviers
rxaviers / gist:7360908
Last active July 8, 2024 07:59
Complete list of github markdown emoji markup

People

:bowtie: :bowtie: 😄 :smile: 😆 :laughing:
😊 :blush: 😃 :smiley: ☺️ :relaxed:
😏 :smirk: 😍 :heart_eyes: 😘 :kissing_heart:
😚 :kissing_closed_eyes: 😳 :flushed: 😌 :relieved:
😆 :satisfied: 😁 :grin: 😉 :wink:
😜 :stuck_out_tongue_winking_eye: 😝 :stuck_out_tongue_closed_eyes: 😀 :grinning:
😗 :kissing: 😙 :kissing_smiling_eyes: 😛 :stuck_out_tongue:
@mathebox
mathebox / color_conversion.py
Created April 12, 2015 16:47
Python methods to convert colors between RGB, HSV and HSL
import math
def rgb_to_hsv(r, g, b):
r = float(r)
g = float(g)
b = float(b)
high = max(r, g, b)
low = min(r, g, b)
h, s, v = high, high, high
@garretthyder
garretthyder / woocommerce_emails_attach_downloadables.php
Created August 13, 2015 11:45
Add Downloadable Products to Woocommerce Completed Order & Invoice Emails as Attachments
<?php
// Add Downloadable Products to Woocommerce Completed Order & Invoice Emails as Attachments
function woocommerce_emails_attach_downloadables($attachments, $status, $order) {
if ( ! is_object( $order ) || ! isset( $status ) ) {
return $attachments;
}
if ( empty( $order ) ) {
return $attachments;
@tomaes
tomaes / oneliners.glsl
Last active February 11, 2019 10:32
shadertoy GLSL oneliners
// fragment shader one-liners
// note: some might break for timing reasons (iDate.a/iDate.w) and some for compatibility reasons ("f+=" on a Mac, f.e.)
//
// void mainImage( out vec4 f, vec2 p )
// and then...
// "flames (red)"
{f=vec4(p.x/p.y*mod(sin(p.x-iDate.a),.001*length(p-.9)),.2,.5,1.0);}
// "rain (small)"
@345161974
345161974 / qtableview_demo.py
Created February 28, 2017 08:31
PyQt QTableView with CheckBox and Model Update demo code(PyQt 4.8.7, Python 3.4.3)
''' pqt_tableview3.py
explore PyQT's QTableView Model
using QAbstractTableModel to present tabular data
allow table sorting by clicking on the header title
used the Anaconda package (comes with PyQt4) on OS X
(dns)
'''
#coding=utf-8
@Meatplowz
Meatplowz / FBX_Scene.py
Last active April 29, 2024 10:12
This is a wrapper FBX class useful in accessing and modifying the FBX Scene
"""
MIT License
Copyright (c) [year] [fullname]
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
@liorbenhorin
liorbenhorin / Simple_MayaDockingClass.py
Created December 1, 2017 15:04
Simple way to Docking Qt widgets to Maya 2017+
'''
Template class for docking a Qt widget to maya 2017+.
Author: Lior ben horin
12-1-2017
'''
import weakref
import maya.cmds as cmds
import maya.OpenMayaUI as omui
import datetime
import io
import os
import requests
import shutil
import time
class ShotgunMediaIO:
# Note: chunk_size must be greater than 5,000,000
@minimalefforttech
minimalefforttech / async_callable.py
Last active March 28, 2024 21:46
A simple example of running code on separate threads
# Copyright (C) 2024 Alex Telford
# http://minimaleffort.tech
# This work is licensed under the Creative Commons Attribution 4.0 International License.
# To view a copy of this license, visit http://creativecommons.org/licenses/by/4.0/ or send a letter to Creative Commons,
# PO Box 1866, Mountain View, CA 94042, USA.
# Distributed without any warranty or liability, use at your own risk
# This is an example of deffering code using Qt event loops
try:
from PySide6 import QtCore, QtWidgets