Skip to content

Instantly share code, notes, and snippets.

View csprance's full-sized avatar
🐝

Chris Sprance csprance

🐝
View GitHub Profile
@Alquimista
Alquimista / bezdraw.py
Created October 9, 2011 20:45 — forked from jl2/bezdraw.py
Draw Bezier curves using Python and PyQt
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import sys
import math
from PyQt4 import QtGui, QtCore
def binomial(i, n):
@gre
gre / easing.js
Last active June 27, 2024 15:37
Simple Easing Functions in Javascript - see https://github.com/gre/bezier-easing
/*
* This work is free. You can redistribute it and/or modify it under the
* terms of the Do What The Fuck You Want To Public License, Version 2,
* as published by Sam Hocevar. See the COPYING file for more details.
*/
/*
* Easing Functions - inspired from http://gizma.com/easing/
* only considering the t value for the range [0, 1] => [0, 1]
*/
EasingFunctions = {
@rxaviers
rxaviers / gist:7360908
Last active July 23, 2024 17:36
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:
@patriciogonzalezvivo
patriciogonzalezvivo / GLSL-Noise.md
Last active July 15, 2024 12:10
GLSL Noise Algorithms

Please consider using http://lygia.xyz instead of copy/pasting this functions. It expand suport for voronoi, voronoise, fbm, noise, worley, noise, derivatives and much more, through simple file dependencies. Take a look to https://github.com/patriciogonzalezvivo/lygia/tree/main/generative

Generic 1,2,3 Noise

float rand(float n){return fract(sin(n) * 43758.5453123);}

float noise(float p){
	float fl = floor(p);
  float fc = fract(p);
@Farfarer
Farfarer / xNormalHelpers.py
Created January 5, 2015 10:09
Just a few helper bits for xNormal/python.
#!/usr/bin/env python
import lx
import subprocess
import os
# Paths for xNormal.
path_xnormal_basedir = r'C:\Program Files\Santiago Orgaz'
path_xnormal_exedir = r'\x64\xNormal.exe'
path_xnormal = r'C:\Program Files\Santiago Orgaz\xNormal 3.18.9\x64\xNormal.exe'
@tcrowson
tcrowson / morphToMesh.py
Last active April 11, 2018 20:56
Modo 901 command for freezing a morph to a new mesh.
# Command for freezing a morph to a new mesh.
# 1. Select a morph map
# 2. run morph.freezeToMesh
# 3. A new mesh bearing the name of the morph map will be created, with the frozen morph shape in it.
import lx
import lxu
import lxifc
import modo
@ivogrig
ivogrig / CmdSetTag.py
Last active May 7, 2016 07:22
Example command to read or write item tags
"""Example command to read or write item tags
Example usage:
item.editTag sunLight013 TAGN "Test"
item.editTag sunLight013 TAGN ?
import modo
item = modo.Item('Directional Light')
value = 'Test'
@spalladino
spalladino / mysql-docker.sh
Created December 22, 2015 13:47
Backup and restore a mysql database from a running Docker mysql container
# Backup
docker exec CONTAINER /usr/bin/mysqldump -u root --password=root DATABASE > backup.sql
# Restore
cat backup.sql | docker exec -i CONTAINER /usr/bin/mysql -u root --password=root DATABASE
@awesomebytes
awesomebytes / reduce_faces.py
Created April 6, 2016 23:23
Executing meshlab from commandline reduce faces of a mesh iteratively
#!/usr/bin/env python
import sys
import os
import subprocess
# Script taken from doing the needed operation
# (Filters > Remeshing, Simplification and Reconstruction >
# Quadric Edge Collapse Decimation, with parameters:
# 0.9 percentage reduction (10%), 0.3 Quality threshold (70%)
@stasm
stasm / .env
Last active December 17, 2021 18:20
Pontoon in Docker
SECRET_KEY=hiphopopotamus
DJANGO_DEV=True
DJANGO_DEBUG=True
DATABASE_URL=postgres://pontoon:pontoon@localhost/pontoon
SESSION_COOKIE_SECURE=False
SITE_URL=http://localhost:8000
FXA_CLIENT_ID=2651b9211a44b7b2
FXA_SECRET_KEY=a3cafccbafe39db54f2723f8a6f804c337e362950f197b5b33050d784129d570
FXA_OAUTH_ENDPOINT=https://oauth-stable.dev.lcip.org/v1
FXA_PROFILE_ENDPOINT=https://stable.dev.lcip.org/profile/v1