Skip to content

Instantly share code, notes, and snippets.

@rstecca
rstecca / BlenderArrayToObjects.py
Last active December 30, 2020 16:40
Blender Python script to process Array Modifiers to create transformed Object clones rather than just geometry
import bpy
from mathutils import Vector, Matrix, Quaternion, Euler
from random import uniform
# Uses Array modifier data to generate OBJECTS rather than just geometry
# Find this Gist at https://gist.github.com/rstecca/7fe38e3846749c0118e6bd20cb83c39c
# github.com/rstecca
# Only works with Array Modifiers with ObjectOffset
# Tested in Blender 2.83.1
@madelinegannon
madelinegannon / jetson-nano_openFrameworks_setup_tutorial.md
Last active February 4, 2024 16:41
How to Set Up the NVIDIA Jetson Nano for openFrameworks
@thepoppingone
thepoppingone / m3u8streamffmpegdl.sh
Last active February 27, 2023 14:32
Download m3u8 playlist with ffmpeg - step by step download script (ffmpeg binary required)
#!/bin/sh
# Author : Wang Poh Peng
# Description : Use FFMPEG to download videos into mkv or mp4 format
RED='\033[1;31m'
NC='\033[0m' # No Color
GREEN='\033[0;32m'
CYAN='\033[0;36m'
@nicoplv
nicoplv / ReimportAsset.cs
Last active May 18, 2018 10:06
Automatize the reimportation of working file from a folder ended with '~' (a demo video is available here https://youtu.be/S-yyK3Fzw3c)
using UnityEngine;
using UnityEditor;
using System.Text.RegularExpressions;
using System.IO;
public class ReimportAsset : MonoBehaviour
{
#region MenuItem Methods
[MenuItem("Assets/Reimport from ~ &R", false, priority = 40)]
@rstecca
rstecca / MakeA3DObjectDraggable.cs
Last active September 29, 2021 11:32
How to make a 3D object draggable in Unity3D
using System;
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.EventSystems;
/*
MAKE A 3D OBJECT DRAGGABLE
Riccardo Stecca
http://www.riccardostecca.net
@keijiro
keijiro / c3d-unity.md
Created November 13, 2016 15:04
Mocap data processing workflow (c3d -> Unity)
  • Import the .c3d file into MotionBuilder.
  • Create an actor and align it to the markers. Then assign the markers to the actor. See the tutorial for the detailed steps.
  • Merge the .fbx file of the target model. See the tutorial for the detailed steps.
  • Characterize the target model. See the tutorial for the detailed steps.
  • Set the actor as an input source in the character settings. Then plot the animation to the skeleton. See the tutorial for the detailed steps.
  • Save the project at this point.
  • Select the joint hierarchy and the character, and then export it with "File" -> "Save Selection". Note that "Select Branches" in the right click menu should be used to select the whole hierarchy (left click only select a top node).
// LoadingScreenManager
// --------------------------------
// built by Martin Nerurkar (http://www.martin.nerurkar.de)
// for Nowhere Prophet (http://www.noprophet.com)
//
// Licensed under GNU General Public License v3.0
// http://www.gnu.org/licenses/gpl-3.0.txt
using UnityEngine;
using UnityEngine.UI;
@szolotykh
szolotykh / twitter-post.py
Created January 29, 2015 16:52
Script post on twitter message and image with tweepy
import tweepy
import os
# Consumer keys and access tokens, used for OAuth
consumer_key = ''
consumer_secret = ''
access_token = ''
access_token_secret = ''
# OAuth process, using the keys and tokens
@flarb
flarb / MapUtils.cs
Created February 18, 2013 20:50
A port of this PHP code: http://stackoverflow.com/questions/1763917/google-static-maps-move-maps-with-a-finger To C# in Unity3D to convert google maps lat/lng to pixel coordinates and vice versa.
using UnityEngine;
using System.Collections;
public class MapUtils {
static float GOOGLEOFFSET = 268435456f;
static float GOOGLEOFFSET_RADIUS = 85445659.44705395f;//GOOGLEOFFSET / Mathf.PI;
static float MATHPI_180 = Mathf.PI/180f;
static private float preLonToX1 = GOOGLEOFFSET_RADIUS * (Mathf.PI/180f);