Skip to content

Instantly share code, notes, and snippets.

View Charl13's full-sized avatar

Charlie Charl13

  • Beverwijk, Netherlands
View GitHub Profile
@Charl13
Charl13 / .gitconfig
Last active June 23, 2021 09:25
.gitconfig
[user]
email = [email protected]
name = Charlie Vieillard
[pager]
diff = delta
log = delta
reflog = delta
show = delta
@Charl13
Charl13 / .tidyconfig
Created February 21, 2017 07:48
.tidyconfig
anchor-as-name: no
doctype: omit
drop-empty-paras: no
new-blocklevel-tags: span
fix-backslash: no
fix-bad-comments: no
fix-uri:no
hide-endtags: no
join-styles: no
literal-attributes: yes
# Path to your oh-my-zsh installation.
export ZSH="/Users/charlie/.oh-my-zsh"
# Set name of the theme to load --- if set to "random", it will
# load a random theme each time oh-my-zsh is loaded, in which case,
# to know which specific one was loaded, run: echo $RANDOM_THEME
# See https://github.com/robbyrussell/oh-my-zsh/wiki/Themes
ZSH_THEME="robbyrussell"
[mysql]
pager = 'pspg -s 0 -X --force-uniborder --quit-if-one-screen'
@Charl13
Charl13 / .tmx.conf
Last active June 21, 2021 10:11
.tmux.conf
set -g prefix C-b
bind C-b send-prefix
bind-key h split-window -h
bind-key v split-window -v
# VIM key bindings.
set-window-option -g mode-keys vi
unbind-key -T copy-mode-vi v
" ============================================================================ "
" === PLUGINS === "
" ============================================================================ "
"
" Specify a directory for plugins
" - For Neovim: stdpath('data') . '/plugged'
" - Avoid using standard Vim directory names like 'plugin'
call plug#begin('~/.local/share/nvim/plugged')
" Text manipulation
@Charl13
Charl13 / mpu6050.ino
Last active June 17, 2021 20:21
Draft: Arduino MPU6050 via I2C
#include "Wire.h"
#include "I2Cdev.h"
#include "MPU6050_6Axis_MotionApps20.h"
MPU6050 mpu;
#define INTERRUPT_PIN 7
bool dmpReady = false; // set true if DMP init was successful
uint8_t devStatus; // return status after each device operation (0 = success, !0 = error)
@Charl13
Charl13 / development-env.sh
Last active June 25, 2021 21:11
development-env.sh
export GIST_URL_ZSHRC="https://gist.githubusercontent.com/Charl13/965e0a2406edcf4b9ea2b3841d1e76a7/raw/496118c0bfb5f043cdef8105fdf1e52b658ba6fd/.zshrc"
export GIST_URL_TMUXCONF="https://gist.githubusercontent.com/Charl13/429996d635aff4a3bceb1ecb821e0727/raw/7ac2738856c50ffc9d892c3b8772e55ab1b4cc0b/.tmx.conf"
export GIST_URL_NVIMINIT="https://gist.githubusercontent.com/Charl13/b1c00e81dc286b2a8bd1c4ead0864c07/raw/e00a08c10b15483a30a0539f08ca935987a0f8ba/init.vim"
export GIST_URL_COCCONFIG="https://gist.githubusercontent.com/Charl13/34ed10f05bcb1e36d67bd5d4d3d7460b/raw/e45b82d158edee6595deafdcdde5ea1c40abd727/coc-config.json"
export GIST_URL_GITCONFIG="https://gist.githubusercontent.com/Charl13/0205e1e1fdfc5497ce6a3b5e30d9f150/raw/7e0d30e48473c42238c1e47615d780402bd727d0/.gitconfig"
export GIST_URL_MYSQLCONFIG="https://gist.githubusercontent.com/Charl13/e8e1a8b6638b7e67e019f96ed93258f9/raw/b9667520e6ee3bbe2c43691954018d90a364c8ce/.my.cnf"
export RELEASE_URL_DELTA="https://github.com/dandavison/delta/releases/do
@Charl13
Charl13 / coc-config.json
Created June 21, 2021 14:40
coc-config.json
{
"list.maxPreviewHeight": 30,
"list.height": 20,
"explorer.icon.enableNerdfont": true,
"explorer.keyMappings.global": {
"k": "nodePrev",
"j": "nodeNext",
"*": "toggleSelection",
@Charl13
Charl13 / main.cpp
Last active August 31, 2021 06:52
Convert float to 16-bit integer to bytes
#include <stdio.h>
#include <stdint.h>
/**
* Output result:
*
* Float: -172.500000
* Integer (16 bit): -172
* Bytes (as decimal): 84, -1
* Result (integer 16-bit): -172