Skip to content

Instantly share code, notes, and snippets.

View edg-l's full-sized avatar
🪨
making compilers

Edgar edg-l

🪨
making compilers
View GitHub Profile
global _start
section .text
stdout equ 1
_start:
mov r8, 1 ; initial line length
mov r9, 0 ; chars written
mov rdx, buffer
#![deny(clippy::all)]
#![deny(clippy::nursery)]
#![allow(clippy::cast_possible_truncation)]
use std::{
collections::hash_map::RandomState,
hash::{BuildHasher, Hash, Hasher},
};
#[derive(Debug, Clone)]
/*
aprilFools.css
Written by Wes Bos
I assume no responsibility for angry co-workers or lost productivity
Put these CSS definitons into your co-workers Custom.css file.
They will be applied to every website they visit as well as their developer tools.
*/
@edg-l
edg-l / day2b.rs
Last active December 2, 2021 08:56
aoc2021 day 2 b in rust
use std::{
fmt::{self, write},
str::FromStr,
};
#[derive(Debug, Clone)]
struct ParseError(String);
impl fmt::Display for ParseError {
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
@edg-l
edg-l / build-ddnet-clang.sh
Created September 6, 2021 14:22
my build script for developing ddnet
rm -rf build
mkdir -p build
cd build
export CC=/usr/bin/clang
export CXX=/usr/bin/clang++
cmake .. -GNinja -DMYSQL=ON -DCMAKE_BUILD_TYPE:STRING=RelWithDebInfo \
-DCMAKE_EXPORT_COMPILE_COMMANDS=ON -DVIDEORECORDER=ON -DDOWNLOAD_GTEST=ON \
-D_CMAKE_TOOLCHAIN_PREFIX=llvm-
ninja
@edg-l
edg-l / .psqlrc
Created November 18, 2020 13:04
psql config
\set QUIET 1
\timing
\x auto
\set PROMPT1 '%[%033[1m%]%M %n@%/%R%[%033[0m%]%# '
\set PROMPT2 '[more] %R > '
\pset null '[NULL]'
\set VERBOSITY verbose
\set HISTFILE ~/.psql_history- :DBNAME
\set HISTCONTROL ignoredups
\set COMP_KEYWORD_CASE upper
{
"coc.preferences.extensionUpdateCheck": "daily",
"python.jediEnabled": false,
"diagnostic.virtualTextCurrentLineOnly": false,
"diagnostic.virtualText": true,
"suggest.enablePreview": true,
"git.enableGutters": true,
"clangd.semanticHighlighting": true,
"rust-analyzer.updates.channel": "nightly",
"rust-analyzer.procMacro.enable": true,
@edg-l
edg-l / .vimrc
Last active October 23, 2022 07:33
neovim config
call plug#begin()
Plug 'tpope/vim-fugitive'
Plug 'tpope/vim-surround'
Plug 'airblade/vim-gitgutter'
"Plug 'itchyny/lightline.vim'
Plug 'cespare/vim-toml'
Plug 'tpope/vim-sleuth'
Plug 'junegunn/fzf', { 'dir': '~/.fzf', 'do': './install --all' }
@edg-l
edg-l / manage.py
Created February 13, 2020 23:17
tw server start
import os
import sys
import subprocess
import signal
import time
from typing import List
basedir = os.path.dirname(os.path.realpath(__file__))
@edg-l
edg-l / manage.py
Created December 22, 2019 11:38
Teeworlds server management script
#!/usr/bin/env python3
import os
import sys
import subprocess
import signal
import time
from typing import List
basedir = os.path.dirname(os.path.realpath(__file__))