Skip to content

Instantly share code, notes, and snippets.

@ghosty141
ghosty141 / Buttery_Smooth_Emacs.md
Created February 13, 2023 17:51
Buttery Smooth Emacs - Mirror of Daniel Colasciones great blog post about emacs' inner workings

original url - https://www.facebook.com/notes/daniel-colascione/buttery-smooth-emacs/10155313440066102/

Buttery Smooth Emacs

30 October 2016

Public Emacs has flickered for 30 years. Now, it should be flicker-free. I’ve just landed support for double-buffered rendering for the X11 port. Now you should be able to edit, resize, and introduce bugs in your awful codebase without seeing a partially-rendered buffer or being incited to murder by barely-perceptible white flashes while editing that

@ghosty141
ghosty141 / guide.md
Last active December 27, 2020 19:43

Venice Unleashed Modding

Preface

If you want to develop your own VU mod(s) I think it's best if you've already programmed either in lua or other scripting languages. You should be familiar with basic concepts like classes, if, for, while etc. Basic knowledge of object oriented programming is also useful but not needed.

Most of the difficulty lies in knowing where and how to change things or use

class 'DogfightMod'
function DogfightMod:__init()
print("Initializing DogfightMod")
Events:Subscribe('Level:RegisterEntityResources', self, self.OnRegisterResources)
Events:Subscribe('Level:LoadResources', self, self.OnLoadResources)
self:RegisterEvents()
end
function DogfightMod:OnRegisterResources()
@ghosty141
ghosty141 / main.rs
Last active March 8, 2020 12:48
Using RefCell for multiple mutable references
use std::cell::RefCell;
fn main() {
let a = A {
msg: String::from("Hi!"),
};
let x = RefCell::new(a);
let b = B { b: &x };
let c = C { c: &x };
b.b.borrow_mut().say_hi();
@ghosty141
ghosty141 / .ycm_extra_conf.py
Created June 17, 2019 18:26
.ycm_extra_conf.py that just wraps a .clang_complete file for usage with YouCompleteMe and adds some extra flags
import os
import ycm_core
flags = [
'-Wall',
'-Wextra',
'-Werror',
'-Wno-long-long',
'-Wno-variadic-macros',
'-fexceptions',