Skip to content

Instantly share code, notes, and snippets.

@imjp94
imjp94 / build.gd
Last active January 10, 2023 18:21
Build script to help exporting Godot project.
tool
extends SceneTree
const PLATFORM_ANDROID = "Android"
const PLATFORM_HTML5 = "HTML5"
const PLATFORM_IOS = "iOS"
const PLATFORM_LINUX = "Linux/X11"
const PLATFORM_MAC = "Mac OSX"
const PLATFORM_UWP = "UWP"
const PLATFORM_WINDOWS = "Windows Desktop"
@imjp94
imjp94 / editor_settings-3.tres
Created August 30, 2020 18:51
Godot Editor Settings 3.0
[gd_resource type="EditorSettings" format=2]
[resource]
interface/editor/main_font_size = 12
interface/editor/code_font_size = 12.0
interface/editor/hide_console_window = true
interface/theme/preset = "Custom"
interface/theme/base_color = Color( 0.239216, 0.239216, 0.239216, 1 )
interface/theme/accent_color = Color( 0.960784, 0.772549, 0.333333, 1 )
interface/theme/contrast = 0.2
@imjp94
imjp94 / editor_layouts.cfg
Created August 30, 2020 18:50
Godot Editor Layout Config
[MyLayout]
dock_3="FileSystem"
dock_5="Scene,Import"
dock_6="Inspector,Node"
dock_filesystem_split=-38
dock_filesystem_display_mode=1
dock_filesystem_file_list_display_mode=0
dock_split_2=0
dock_split_3=-20
{
"version": "2.0.0",
"tasks": [
{
"label": "Sass Watch",
"type": "shell",
"command": "sass.bat --watch '${file}' $(dirname '${fileDirname}')/css/${fileBasenameNoExtension}.css"
}
]
}
@imjp94
imjp94 / excel_datetime_converter.py
Last active September 18, 2018 19:52
Convert datetime from/to excel serial date
from datetime import datetime, time
def serial_to_datetime(serial):
""" Convert excel serial date to :class:`datetime` """
# 30/12/1899 used instead of 01/01/1900 in order to offset 2 days due to, serial counting & excel leap year bug
dt = datetime.fromordinal(datetime(1899, 12, 30).toordinal() + int(serial))
t = serial_to_time(serial)
return dt.replace(hour=t.hour, minute=t.minute, second=t.second)