Skip to content

Instantly share code, notes, and snippets.

View pwab's full-sized avatar
💭
waiting for godot

Philipp Wabnitz pwab

💭
waiting for godot
View GitHub Profile

Protocol

Your response must adhere to the following protocol:

  1. Empty lines are discarded and not processed
  2. Lines prefixed with {command}: are processed as commands.
  3. All other lines are processed as messages.

Rules for responding:

  1. You are allowed to send messages to the user as well as run commands to do things.
  2. You are allowed to send multiple messages to the user from a single response.
  3. You are only allowed to send a single sentence per message line.

DeerTears Fork of Notepad++ userstyle for Godot's GDScript

I fixed a lot of stuff but it's not perfect. Saw this old userstyle floating around for like a year before I decided to try messing with it more.

Roadmap

  • Get all functions to highlight correctly
  • Try to implement parts of the GD-utils functions for autocomplete
  • Attempt to PR this to Notepad++'s official repo
  • Have fun
@atomius0
atomius0 / PixelPerfectScaling.gd
Created March 12, 2018 16:29
Pixel-Perfect scaling script, ported to Godot 3.
# original code by CowThing: https://github.com/godotengine/godot/issues/6506
# port to Godot 3 and bugfixes by atomius.
# usage:
# set this script as AutoLoad (Singleton enabled)
#
# in the project settings:
# [display]
# set 'window/size/width' and 'window/size/height' to your desired render resolution.
# set 'window/size/test_width' and 'window/size/test_height' to the initial window size.
@nosh247
nosh247 / GDScriptCamera.gd
Created March 6, 2018 18:55
Zelda like camera movement - Godot 3.0
extends Camera2D
onready var window_size = Vector2(320,240)#OS.get_window_size()
onready var player = get_parent().get_node("Player")
onready var player_world_pos = get_player_world_pos()
onready var new_player_grid_pos = Vector2()
onready var tweenStart = false
onready var tween = get_node("Tween")
onready var new_cam_pos = Vector2()
@cart
cart / gist:cc095f4950c40c1fe25169be5ee78247
Created February 1, 2018 06:34
A collection of C# Math extensions for Godot
using Godot;
namespace HighHat.MathHelpers
{
public static class MathExtensions
{
// TODO: expose Godot's Transform::interpolate_with to scripting. This is just a C# port
public static Transform InterpolateWith(this Transform transform, Transform targetTransform, float percent, bool includeScale = true)
{
var rotation = transform.basis.Orthonormalized().ToQuat();
@cart
cart / NodeExtensions.cs
Created February 1, 2018 06:31
A collection of C# Node extensions for Godot
using Godot;
using System;
using System.Collections.Generic;
using System.Text.RegularExpressions;
namespace HighHat.Scene.Nodes
{
public static class NodeExtensions
{
private static Regex _nameRegex = new Regex("@*(?<Name>[\\w|\\d]+)@*.*");
@marcelkornblum
marcelkornblum / export_repo_issues_to_csv.py
Last active December 18, 2023 20:20 — forked from unbracketed/export_repo_issues_to_csv.py
Export Issues from Github repo to CSV (API v3)
"""
This is strongly based on https://gist.github.com/unbracketed/3380407;
thanks to @unbracketed and the various commenters on the page.
I've mainly cleaned up the code into basic methods, and included the
various suggestions in the comments. Hope this is useful to someone.
Make sure you have `requests` and `csv` installed via pip then run it:
`python export_gh_issues_to_csv.py`
@jonathansick
jonathansick / query.graphql
Last active January 20, 2024 07:58
GitHub GraphQL repo commit history query
{
repository(name: "sickvim", owner: "jonathansick") {
ref(qualifiedName: "master") {
target {
... on Commit {
id
history(first: 5) {
pageInfo {
hasNextPage
}
@max-mapper
max-mapper / 0.md
Last active February 25, 2024 12:24
JS hoisting by example

JavaScript function hoisting by example

Below are many examples of function hoisting behavior in JavaScript. Ones marked as works successfuly print 'hi!' without errors.

To play around with these examples (recommended) clone them with git and execute them with e.g. node a.js

Notes on hoisting

(I may be using incorrect terms below, please forgive me)

anonymous
anonymous / gist:5663418
Created May 28, 2013 15:04
Blender python script to export the motion tracking markers to .csv files.
from __future__ import print_function
import bpy
D = bpy.data
printFrameNums = False # include frame numbers in the csv file
relativeCoords = False # marker coords will be relative to the dimensions of the clip
f2=open('export-markers.log', 'w')
print('First line test', file=f2)
for clip in D.movieclips: