Skip to content

Instantly share code, notes, and snippets.

Avatar
🚀
Building a spacecraft! 🛸👽🌌

Oğuzhan Eroğlu rohanrhu

🚀
Building a spacecraft! 🛸👽🌌
View GitHub Profile
@rohanrhu
rohanrhu / border_radius.frag
Created Feb 14, 2021
Godot Engine (GLSL) Border Radius Shader
View border_radius.frag
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 Dec 24, 2020
GDBFrontend Linked-List Visualizer Example Program
View llvisualizerex.c
/*
* Example for GDBFrontend Linked-List Visualizer
*/
#include <stdio.h>
#include <stdlib.h>
typedef struct llist llist_t;
struct llist {
int id;
View star.c
#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++) {
View LogitechGClickFlasher.lua
EnablePrimaryMouseButtonEvents(true);
function OnEvent(event, arg)
if arg == 1 then
color = 0
repeat
if color == 0 then
SetBacklightColor(255,0,0, "mouse")
color = 1
View SuccessQueuee.js
var SuccessQueuee = function () {
this.queuee = [];
this.is_ran = false;
};
SuccessQueuee.prototype.push = function (func) {
if (this.is_ran) {
func();
return false;
}
View Centralize.py
# 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