Skip to content

Instantly share code, notes, and snippets.

@Racinettee
Racinettee / main.go
Created March 15, 2024 07:05
Generate some code using go-llvm from tingygo
// Sample usage of tingygo's go-llvm package to generate a
// function and generate a bit of code
// In order to compile this sample llvm needs to be installed first, the instructions here should be followed
// to install to the system: https://tinygo.org/docs/guides/build/bring-your-own-llvm/
package main
import (
"fmt"
"tinygo.org/x/go-llvm"
@Racinettee
Racinettee / drawsprite.scm
Created January 31, 2023 06:51
chickadee draw sprite
(use-modules
(chickadee)
(chickadee math vector)
(chickadee graphics texture)
(chickadee graphics sprite))
(define sprite #f)
(define load (lambda ()
(set! sprite (load-image "chickadee.png"))))
@Racinettee
Racinettee / .xmobarrc
Created March 2, 2022 23:13
My xmobar config
-- Xmobar (http://projects.haskell.org/xmobar/)
-- This is one of the xmobar configurations for DTOS.
-- This config is packaged in the DTOS repo as 'dtos-xmobar'
-- Color scheme: Doom One
-- Dependencies:
-- otf-font-awesome
-- ttf-mononoki
-- ttf-ubuntu-font-family
-- htop
-- emacs
@Racinettee
Racinettee / xmonad.hs
Created March 2, 2022 19:17
my xmonad config (based on dt with modifications)
-- Base
import XMonad
import System.Directory
import System.IO (hPutStrLn)
import System.Exit (exitSuccess)
import qualified XMonad.StackSet as W
-- Actions
import XMonad.Actions.CopyWindow (kill1)
import XMonad.Actions.CycleWS (Direction1D(..), moveTo, shiftTo, WSType(..), nextScreen, prevScreen)
@Racinettee
Racinettee / config.h
Created March 2, 2022 18:39
My st config.h (solarized light, bigger font)
/* See LICENSE file for copyright and license details. */
/*
* appearance
*
* font: see http://freedesktop.org/software/fontconfig/fontconfig-user.html
*/
//static char *font = "xft:SauceCodePro Nerd Font Mono:regular:size=9:antialias=true:hinting=true";
static char *font = "Liberation Mono:regular:size=13:antialias=true:hinting=true";
//Liberation Mono:pixelsize=12:antialias=true:autohint=true";
@Racinettee
Racinettee / FileTree.d
Created April 28, 2017 06:54
A filetree in Gtk and D
module coral.component.filetree;
import core.thread;
import gdk.Pixbuf : Pixbuf;
import gtk.IconTheme : IconTheme;
import gtk.TreeIter : TreeIter;
import gtk.TreeStore : TreeStore;
import gtk.TreeView : TreeView;
import gtkc.gtk : GtkIconLookupFlags;
@Racinettee
Racinettee / LuaRegisterInstance.d
Last active November 15, 2016 07:37
Register an app window with a method to Lua (5.2)
const char* metatableName = "AppWindowMetaTable";
void registerMainWindow(State luaState, AppWindow initialWindow)
{
lua_State* state = luaState.state;
AppWindow* window = cast(AppWindow*)lua_newuserdata(
state, initialWindow.sizeof);
*window = initialWindow;
@Racinettee
Racinettee / GDBTalk.cpp
Created November 13, 2015 22:22
Fork a process to become gdb, and then send it commands.
#include <unistd.h>
#include <stdio.h>
#include <stdlib.h>
#include <sys/wait.h>
#include <string>
int main()
{
int my_pipe[2];
if (pipe(my_pipe) == -1) {