Skip to content

Instantly share code, notes, and snippets.

Avatar
💣

Edgar edg-l

💣
View GitHub Profile
View april-fools.css
/*
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 Dec 2, 2021
aoc2021 day 2 b in rust
View day2b.rs
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 Sep 6, 2021
my build script for developing ddnet
View build-ddnet-clang.sh
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 Nov 18, 2020
psql config
View .psqlrc
\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
View coc-settings.json
{
"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 Oct 23, 2022
neovim config
View .vimrc
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 Feb 13, 2020
tw server start
View manage.py
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 Dec 22, 2019
Teeworlds server management script
View manage.py
#!/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__))
View grid.tsx
import React from 'react';
export const Row: React.FC = props => {
return <div className="row">{props.children}</div>;
};
export interface ColProps {
size: number;
device: 'xs' | 'sm' | 'md' | 'lg';
}
@edg-l
edg-l / .vimrc
Last active Oct 9, 2019
my vimrc
View .vimrc
call plug#begin('~/.vim/plugged')
" Make sure you use single quotes
Plug 'tpope/vim-fugitive'
Plug 'tpope/vim-surround'
Plug 'airblade/vim-gitgutter'
Plug 'vim-airline/vim-airline'
Plug 'vim-airline/vim-airline-themes'
Plug 'nathanaelkane/vim-indent-guides'