Skip to content

Instantly share code, notes, and snippets.

View dzava's full-sized avatar

Dimitris Zavantias dzava

View GitHub Profile
@dzava
dzava / app.js
Created December 13, 2017 11:33
Laravel mix hot module replacement for tailwindcss
require('../less/app.less')
import bpy
context = bpy.context
scene = context.scene
def bones():
active = context.active_pose_bone
if active is context.selected_pose_bones[0]:
return [active, context.selected_pose_bones[1]]
return [active, context.selected_pose_bones[0]]
@dzava
dzava / AutoColor.js
Last active June 10, 2018 00:10
Plugin to automatically color chart.js datasets
const colors = [
{
backgroundColor: 'transparent',
borderColor: 'rgba(115,115,115,1)',
},
{
backgroundColor: 'transparent',
borderColor: 'rgba(241, 90, 96, 1)',
},
{
@dzava
dzava / script.sh
Last active February 3, 2019 15:09
Upgrade Ogre meshes for RigsOfRods
#!/usr/bin/env/ bash
rm -rf /tmp/upgrade
for archive in *.zip; do
unzip $archive -d /tmp/upgrade
for mesh in /tmp/upgrade/*.mesh; do
OgreMeshUpgrader $mesh
@dzava
dzava / Makefile
Created February 3, 2020 23:11
RoR makefile
.DEFAULT_GOAL := run
runonly:
cd ./build/ && ./RunRoR -map simple2 -truck UnlimitedTrophyTruck.truck -enter
run: download
cd ./build/ && ./RunRoR -map simple2 -truck UnlimitedTrophyTruck.truck -enter
download: build
rsync -arzz vbox:/root/rigs-of-rods/redist/ ./build/
 using UnityEngine;
public static class ExtDebug
{
//Draws just the box at where it is currently hitting.
public static void DrawBoxCastOnHit(Vector3 origin, Vector3 halfExtents, Quaternion orientation, Vector3 direction, float hitInfoDistance, Color color)
{
origin = CastCenterOnCollision(origin, direction, hitInfoDistance);
DrawBox(origin, halfExtents, orientation, color);
}