Skip to content

Instantly share code, notes, and snippets.

View darltrash's full-sized avatar
🏠
home.

Neil Wolfkid darltrash

🏠
home.
View GitHub Profile
@moyix
moyix / killbutmakeitlooklikeanaccident.sh
Created February 5, 2022 22:51
Script to inject an exit(0) syscall into a running process. NB: only x86_64 for now!
#!/bin/bash
gdb -p "$1" -batch -ex 'set {short}$rip = 0x050f' -ex 'set $rax=231' -ex 'set $rdi=0' -ex 'cont'
@Miqueas
Miqueas / GioDirectoryRecursive.lua
Last active July 10, 2021 08:16
[Lua + Gio] Reads directory content recursively
local lgi = require("lgi")
local Gio = lgi.require("Gio", "2.0")
local Content = {}
local Dir = ""
function ReadDir(Path, Tab, Indent)
local file = Gio.File.new_for_path(Path)
local enum = file:enumerate_children("standard::name", Gio.FileQueryInfoFlags.NONE)
local path = file:get_path() .. "/"
@gavr123456789
gavr123456789 / async_GTK_gui_example.vala
Last active August 15, 2023 20:50
async GTK 3 4 gui example vala nim
using Gtk;
Button button;
void main (string[] args) {
Gtk.init (ref args);
var window = new Window ();
button = new Button.with_label ("Start counting");
button.clicked.connect (() => {
@diazvictor
diazvictor / StatusIcon.lua
Last active February 9, 2021 08:13
StatusIcon – A Simple Tray Icon Application Using LGI (Lua + Gtk)
local lgi = require('lgi')
local Gtk = lgi.require('Gtk', '3.0')
function message (title)
--[[
Function to display messages to the user.
]]
-- Create Window
local window = Gtk.Dialog {
@deingithub
deingithub / zig.lang
Created October 4, 2019 17:08
Zig Highlighting for GTKSourceView (gedit and a bunch of other GTK+ apps)
<?xml version="1.0" encoding="UTF-8" ?>
<!--
Zig Syntax Highlighting for GTKSourceView components.
Author: deing <admin@15318.de>. This file is available under Creative Commons Zero.
To the extent possible under law, the author(s) have dedicated all copyright and related and neighboring rights to this software to the public domain worldwide.
This software is distributed without any warranty.
You should have received a copy of the CC0 Public Domain Dedication along with this software. If not, see <http://creativecommons.org/publicdomain/zero/1.0/>.
@uheartbeast
uheartbeast / ChromaticAberration.shader
Created August 27, 2019 14:42
Simple Chromatic Aberration Shader for Godot 3
shader_type canvas_item;
uniform bool apply = true;
uniform float amount = 1.0;
uniform sampler2D offset_texture : hint_white;
void fragment() {
vec4 texture_color = texture(TEXTURE, UV);
vec4 color = texture_color;
@raizam
raizam / slent.sql
Last active October 5, 2022 12:53
a port of the famous lent ECS library
--this is Imperial Royal Guard guarding this table
-- | __
-- | /__\
-- | X~~|
-- |-\|//-.
-- /|`.|'.' \
--|,|.\~~ /||
--|:|| ';||
--|||| | ||
local ffi = require('ffi')
--local lib = ffi.load('libraylib.2.0.0.dylib')
local lib = ffi.load('libraylib')
ffi.cdef[[
// Vector2 type
typedef struct Vector2 {
float x;
float y;
} Vector2;
@aaangeletakis
aaangeletakis / How-To-Install-SDL-On-Ubuntu.md
Last active May 18, 2024 15:21
How do I install SDL on ubuntu?

What you need to do to install SDL is:

#install sdl2
sudo apt install libsdl2-dev libsdl2-2.0-0 -y;

#install sdl image  - if you want to display images
sudo apt install libjpeg-dev libwebp-dev libtiff5-dev libsdl2-image-dev libsdl2-image-2.0-0 -y;

#install sdl mixer  - if you want sound
@Rami-Sabbagh
Rami-Sabbagh / LuaTable.lua
Last active July 5, 2020 17:03
A lua library that converts tables to Lua code that can be saved
local LuaTable = {
_VERSION = 'LuaTable v1.0.2 2016/08/27',
_AUTHOR = 'RamiLego4Game',
_URL = 'https://gist.github.com/RamiLego4Game/f656f5c1a118f77c3b7a08f4c65efaaf',
_DESCRIPTION = 'A library that converts tables to Lua code that can be saved',
_LICENSE = [[
MIT LICENSE
Copyright (c) 2016 Rami Sabbagh