Skip to content

Instantly share code, notes, and snippets.

View nicolasdanelon's full-sized avatar
🖖
live long and prosper

Nicolas Danelon nicolasdanelon

🖖
live long and prosper
View GitHub Profile
%define BOCHS_HD_IMAGE ;define this when booting in Bochs as a hard drive image
%define CONSOLE_WIDTH 0x4E
%define RTC_DIVIDER 0xF
%define PADDLE_WIDTH 0x08
%define PADDLE_SPEED 0x2
BITS 16 ;we are running in real mode, so 16 bit only
[org 0x7C00] ;set origin address to 0x7C00. This is where BIOS drops us off in RAM
@leddoo
leddoo / reg_vm.rs
Created December 29, 2022 11:03
a very simple register vm
// a very minimal instruction set.
// it has just enough operations to implement a recursive
// fibonacci function - what a coincidence :D
// NOTE: in my VM, i don't use an `enum`.
// this is just for simplicity.
#[derive(Clone, Copy, Debug)]
enum Instruction {
LoadInt { dst: u8, value: i16 },
Copy { dst: u8, src: u8 },
Add { dst: u8, src1: u8, src2: u8 },
@its-arun
its-arun / DynamicMOTD.sh
Created February 11, 2018 06:25
Dynamic MOTD for MacOS using lolcat, cowsay and fortune.
#Before running script give permission using "chmod +x DynamicMOTD.sh"
#Install Homebrew
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
#Install Lolcat, Cowsay and Fortune
brew install lolcat
brew install cowsay
brew install fortune
#Configuring .bash_profile and .bashrc
@noteed
noteed / default.nix
Last active November 5, 2018 19:08
OS
{ pkgs ? import <nixpkgs> { } }:
let
kernel_version = "4.4.52";
kernel-sha256 = "e8d2ddaece73e1a34e045bbdcdcc1383f658e24537797f8d8e0dd520cf1b1f06";
nix_version = "1.11.9";
nix-sha256 = "0e943e277f37843f9196b0293cc31d828613ad7a328ee77cd5be01935dc6e7e1";
in rec
{
linux-tarball = pkgs.fetchurl {
@mihow
mihow / load_dotenv.sh
Last active May 22, 2024 06:50
Load environment variables from dotenv / .env file in Bash
if [ ! -f .env ]
then
export $(cat .env | xargs)
fi
let # /home/jamie/imp/src/Query.jl, line 340:
local index_2 = index($(Expr(:escape, :playlist)),[2,1])
local index_2_2 = index_2[2]
local index_2_1 = index_2[1]
local lo_2_0 = 1
local hi_2_0 = 1 + length(index_2_2)
local index_3 = index($(Expr(:escape, :playlist_track)),[1,2])
local index_3_1 = index_3[1]
local index_3_2 = index_3[2]
local lo_3_0 = 1
@roachhd
roachhd / README.md
Last active May 23, 2024 22:38
Basics of BrainFuck

=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=

BrainFuck Programming Tutorial by: Katie

=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=

INTRODUCTION

@JoshuaEstes
JoshuaEstes / 000-Cheat-Sheets.md
Last active May 1, 2024 04:03
Developer Cheat Sheets for bash, git, gpg, irssi, mutt, tmux, and vim. See my dotfiles repository for extra info.