Skip to content

Instantly share code, notes, and snippets.

View rohanrhu's full-sized avatar
🐱
Meow...

Oğuzhan Eroğlu rohanrhu

🐱
Meow...
View GitHub Profile
@rohanrhu
rohanrhu / marshal.py
Last active March 4, 2024 19:27
Meowing Cat's Marshaling Utilities
# -*- coding: utf-8 -*-
# Meowing Cat's Marshaling Utilities
# Copyright (C) 2024 Oğuzhan Eroğlu <meowingcate@gmail.com> (https://github.com/rohanrhu)
# Licensed under the MIT License.
# You may obtain a copy of the License at: https://opensource.org/licenses/MIT
"""
* Marshaling utilities for database models and things.
# ! IMPORTANT:
# -*- coding: utf-8 -*-
print("Tournament")
def check(matches_fmt, team):
groups = matches_fmt.split(";")
is_found = False
for group in groups:
# FPS Player
# Copyright (C) 2020 Oğuzhan Eroğlu <rohanrhu2@gmail.com> (https://oguzhaneroglu.com)
extends KinematicBody
onready var nCamera: Camera = $Camera
export var walk_speed: float = 1
export var sprint_factor: float = 2
export var mouse_sensitivity: float = 0.25
@rohanrhu
rohanrhu / border_radius.frag
Created February 14, 2021 20:30
Godot Engine (GLSL) Border Radius Shader
shader_type canvas_item;
uniform float radius: hint_range(0., 1.) = 1;
uniform bool animate = false;
uniform float square_scale: hint_range(0., 1.) = 0.1;
void fragment() {
float sc = square_scale + square_scale/2.;
float r = square_scale + (1. - radius) * (square_scale/2.);
@rohanrhu
rohanrhu / llvisualizerex.c
Last active December 24, 2020 01:41
GDBFrontend Linked-List Visualizer Example Program
/*
* Example for GDBFrontend Linked-List Visualizer
*/
#include <stdio.h>
#include <stdlib.h>
typedef struct llist llist_t;
struct llist {
int id;
@rohanrhu
rohanrhu / star.c
Last active October 11, 2020 21:37
#include <stdio.h>
int main() {
int base = 50;
int ls = base/2;
int ms = 0;
for (int i=0; i < (base/2)+1; i++) {
if (i == base/2) {
for (int j=0; j < base; j++) {
EnablePrimaryMouseButtonEvents(true);
function OnEvent(event, arg)
if arg == 1 then
color = 0
repeat
if color == 0 then
SetBacklightColor(255,0,0, "mouse")
color = 1
var SuccessQueuee = function () {
this.queuee = [];
this.is_ran = false;
};
SuccessQueuee.prototype.push = function (func) {
if (this.is_ran) {
func();
return false;
}
# Centralize cursor
#
# Usage:
# Keybinding: { "keys": ["f1"], "command": "centralize" }
#
# Copyright (C) 2017 Oğuzhan Eroğlu <rohanrhu2@gmail.com>
# The MIT License (MIT)
import sublime_plugin