Skip to content

Instantly share code, notes, and snippets.

View blurymind's full-sized avatar

Todor Imreorov blurymind

View GitHub Profile
@blurymind
blurymind / gist:92566dd333bf869d4eeb
Created March 23, 2016 12:00
stip-animated.json
{
"name": "stip",
"changelog": [
"23/03/2016 - 11:55:51"
],
"nodes": [
{
"name": "Root",
"type": "BONE",
"node_path": "Root",
extends Node2D
var arguments = []
var output = []
#This script should open your file manager in disk C: on start
#Its the equivalent of doing 'start C:\' in the CMD
# The start command (when working) can be used to open any file type with the default software that
#is assigned to it. In this case it opens a directory (default - file explorer) for sake of example.
func _ready():
@blurymind
blurymind / restrictToNumbers.gd
Created July 17, 2016 01:47
godot function that restricts a string to only use numbers - for numeric value input
func _on_H_text_changed():
hInput.set_text(returnNumbersOnly(hInput.get_text()))
hInput.cursor_set_column(hInput.get_text().length(),true)
## This function restricts the input to be only numeric###
func returnNumbersOnly(enteredText):
var word = ''
for letter in enteredText:
var resultingText = RegEx.new()
extends LineEdit
var updating = false
const allowed = ["0","1","2","3","4","5","6","7","8","9"]
func _ready():
connect("text_changed",self,"otc")
@blurymind
blurymind / pan.gd
Last active July 29, 2016 18:58 — forked from neikeq/pan.gd
extends Camera2D
var dragging = false
func _ready():
set_process_input(true)
func _input(event):
if event.type == InputEvent.MOUSE_BUTTON and event.button_index == BUTTON_MIDDLE:
dragging = event.is_pressed()
var curSelectedItem = 0
func _on_ItemList_item_selected( index ):
if curSelectedItem == index: print('Double Clicked!')
curSelectedItem = index
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;; ;;;
;;; Sun Lotion - Data Entry Application ;;;
;;; Created by Todor Imreorov -- blurymind@gmail.com ;;;
;;; For Use with SolarVista ;;;
;;; ;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
Gui, Add, Text, Section x50,Created by Todor Imreorov
[('python36.dll',
'D:\\WORK\\PYTHON\\WinPython-64bit-3.6.3.0-CLEAN\\python-3.6.3.amd64\\python36.dll',
'BINARY'),
('VCRUNTIME140.dll',
'D:\\WORK\\PYTHON\\WinPython-64bit-3.6.3.0-CLEAN\\python-3.6.3.amd64\\VCRUNTIME140.dll',
'BINARY'),
('_ssl',
'D:\\WORK\\PYTHON\\WinPython-64bit-3.6.3.0-CLEAN\\python-3.6.3.amd64\\DLLs\\_ssl.pyd',
'EXTENSION'),
('unicodedata',
@blurymind
blurymind / threevideodemo.js
Created March 15, 2018 14:26 — forked from ErikPeterson/threevideodemo.js
THREEJS Video Texture Demo
//Set up scene, camera, and renderer
var scene = new THREE.Scene;
var camera = new THREE.PerspectiveCamera( 45, window.innerWidth / window.innerHeight, 1, 10000 );
var renderer = new THREE.CanvasRenderer();
renderer.setClearColor( 0xf0f0f0 );
renderer.setSize( window.innerWidth, window.innerHeight );
document.body.appendChild( renderer.domElement );
var video = document.createElement('video');
@blurymind
blurymind / extractFramesFromDroppedVideo
Created September 15, 2018 12:22
Simple Batch script to extract frames from a video file- uses ffmpeg
@echo off
echo This requires you to install ffmpeg
REM ffmpeg -i file.mov -r 24/1 output%03d.png
REM nxF is for file with ext
for %%F in ("%~1") do SET fileNameExt=%%~nxF
for %%F in ("%~1") do SET fileName=%%~nF
echo file name is: %fileName%
SET ffmpegPath=C:\ffmpeg\bin\ffmpeg.exe