Skip to content

Instantly share code, notes, and snippets.

View ppikachu's full-sized avatar

Santiago Toyos ppikachu

  • Argentina
  • 14:00 (UTC -03:00)
  • X @ppika
View GitHub Profile
@jeangjenq
jeangjenq / tcl_snippets.tcl
Last active July 6, 2024 18:25
TCL snippets for Nuke.
# Get input node name
[value this.input0.name][python nuke.thisNode().input(0).name()]
# Set a variable in expression with TCL:
[set VARIABLENAME VALUE; return]
# Use a variable
$VARIABLENAME
# String Operation that return the 5th character from top input name
@danielroe
danielroe / settings.json
Last active April 19, 2025 06:36
VScode settings for a minimal UI
{
// Disable telemetry
"telemetry.telemetryLevel": "off",
// Zen mode
"zenMode.fullScreen": false,
"zenMode.hideTabs": true,
"zenMode.centerLayout": false,
// Theming
"workbench.iconTheme": "city-lights-icons-vsc",
"editor.fontFamily": "Dank Mono",
@bartwttewaall
bartwttewaall / FitFillTest.js
Last active September 15, 2024 16:44
Fit, fill, stretch a texture on a mesh when given the mesh's aspect ratio
import {
Object3D,
Cache,
Texture,
PlaneGeometry,
MeshLambertMaterial,
Mesh,
ClampToEdgeWrapping,
RepeatWrapping,
MirroredRepeatWrapping,
@tkafka
tkafka / listAllEventListeners.js
Last active October 3, 2024 11:02 — forked from dmnsgn/listAllEventListeners.js
List all event listeners in a document
console.table((function listAllEventListeners() {
const allElements = Array.prototype.slice.call(document.querySelectorAll('*'));
allElements.push(document); // we also want document events
const types = [];
for (let ev in window) {
if (/^on/.test(ev)) types[types.length] = ev;
}
let elements = [];
for (let i = 0; i < allElements.length; i++) {
anonymous
anonymous / sphere.pde
Created May 15, 2017 23:58
sphere worms
// by davey aka bees & bombs :)
int[][] result;
float t, c;
float ease(float p) {
return 3*p*p - 2*p*p*p;
}
float ease(float p, float g) {
@GoodBoyDigital
GoodBoyDigital / pixi-performance-tips.txt
Last active June 29, 2023 13:40
Pixi Performance Tips
Global :
- Only optimize when you need to! Pixi can handle a fair amount of content off the bat.
- Be mindful of the complexity of your scene. The more objects you add the slower things will end up.
- Order can help, for example sprite / graphic / sprite / graphic is slower than sprite / sprite / graphic / graphic
- Some older mobile devices run things a little slower. passing in the option 'legacy:true' to the renderer can help with performance
- Culling, is disabled by default as its often better to do this at an application level. If you are GPU it will improve performance, if you are CPU bound - it will degrade performance
Sprites:
- Use spritesheets where possible to minimize total textures
- Sprites can be batched with up to 16 different textures (dependent on hardware)
@Fewes
Fewes / Distortion.shader
Last active November 15, 2022 13:48
Distortion shader for Unity. Supports a normal map.
Shader "Distortion"
{
Properties
{
_Refraction ("Refraction", Range (0.00, 10.0)) = 1.0
_Power ("Power", Range (1.00, 10.0)) = 1.0
_AlphaPower ("Vertex Alpha Power", Range (1.00, 10.0)) = 1.0
_BumpMap( "Normal Map", 2D ) = "bump" {}
_Cull ( "Face Culling", Int ) = 2
@dmnsgn
dmnsgn / listAllEventListeners.js
Created April 5, 2017 15:40
List all event listeners in a document
const listeners = (function listAllEventListeners() {
let elements = [];
const allElements = document.querySelectorAll('*');
const types = [];
for (let ev in window) {
if (/^on/.test(ev)) types[types.length] = ev;
}
for (let i = 0; i < allElements.length; i++) {
const currentElement = allElements[i];
@gastonsoto
gastonsoto / ca_api.php
Last active April 4, 2023 19:40
Sistema de tracking de correo del correo argentino.
<?php
$ch = curl_init();
/* Numero de pieza: Para envios nacionales solo numeros. Para internacionales alfanumerico.
** Codigo alfanumerico ej. CW123456789US
*/
$id = $_GET['id'];
@micalexander
micalexander / youtube-vimeo-thumbnail.js
Created October 14, 2014 21:53
jquery:snippet:Get youtube or vimeo thumbnail url
function get_video_thumb(url, callback){
var id = get_video_id(url);
if (id['type'] == 'y') {
return processYouTube(id);
} else if (id['type'] == 'v') {
$.ajax({
url: 'http://vimeo.com/api/v2/video/' + id['id'] + '.json',
dataType: 'jsonp',
success: function(data) {