Skip to content

Instantly share code, notes, and snippets.

Avatar
🌊

Claudia Callisto13

🌊
View GitHub Profile
View a-new-hope.md

Install instructions for masters-of-cats/a-new-hope NeoVim config.

Install required packages

Mac

brew install python3 python@2 neovim
pip install neovim
View .vimrc.plugins.local
" to use this file, add the following line
" within the 'plug' section of ~/.config/nvim/init.vim
"
" silent source ~/.vimrc.local.plugins
Plug 'arzg/vim-corvine'
Plug 'scwood/vim-hybrid'
View .vimrc
" to use this .vimrc add the following line at
" the bottom of ~/.config/nvim/init.vim
"
" silent source ~/.vimrc
set nowrap
set noswapfile
set background=dark
set colorcolumn=80
View .tmux.conf
# mouse clickiness
set -g mouse on
# new leader sequence: ctrl+space
set -g prefix C-Space
bind r source-file ~/.tmux.conf
# holding ctrl and hitting space twice will toggle to the previous window
bind-key C-Space last-window
# uncomment if you want window numbers to start at 1 rather than 0
#set -g base-index 1
@Callisto13
Callisto13 / inotify_test.c
Created Oct 13, 2019
Based on the demo_inotify.c program by Michael Kerrisk
View inotify_test.c
#include <sys/inotify.h>
#include <limits.h>
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
int
main(int argc, char *argv[])
{
int inotifyFd, wd, rv, j;
View inotify.rs
extern crate inotify;
use std::path::PathBuf;
use inotify::{
WatchMask,
Inotify,
};
View switch-kernel.md

Switching the Kernel

I'm sure there are maaany ways to switch out the ubuntu kernel, here is what I do. Going from 4.4 to 4.10 as an example.

1. Download the kernel version that you're after

wget http://kernel.ubuntu.com/~kernel-ppa/mainline/v4.10/linux-headers-4.10.0-041000_4.10.0-041000.201702191831_all.deb
wget http://kernel.ubuntu.com/~kernel-ppa/mainline/v4.10/linux-headers-4.10.0-041000-generic_4.10.0-041000.201702191831_amd64.deb
View overlay-umount-reproduction.sh
#!/bin/sh
mountandwrite() {
i=$1
echo "mounting $i"
mount -t overlay -o lowerdir=./lower,upperdir=./upper$i,workdir=./work$i overlay target$i
echo "writing $i"
dd if=/dev/urandom of=target$i/foo bs=10M count=10
}
@Callisto13
Callisto13 / timewaster.sh
Last active Jul 24, 2017
Script to extract timings for spiky vizzini runs
View timewaster.sh
#!/bin/bash
export PATH=/var/vcap/packages/cfdot/bin:$PATH
LOG_DIR=/var/vcap/sys/log
export GARDEN_STDOUT_LOGS="$LOG_DIR/garden/saved.log"
REP_STDOUT_LOGS="$LOG_DIR/rep/saved.log"
VIZZINI_ID="$1"
FORMAT="%s\t\t\t%s\n"