Skip to content

Instantly share code, notes, and snippets.

View Callisto13's full-sized avatar
🌊

Claudia Callisto13

🌊
View GitHub Profile
@Callisto13
Callisto13 / timewaster.sh
Last active July 24, 2017 14:48
Script to extract timings for spiky vizzini runs
#!/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"
#!/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
}

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
extern crate inotify;
use std::path::PathBuf;
use inotify::{
WatchMask,
Inotify,
};
@Callisto13
Callisto13 / inotify_test.c
Created October 13, 2019 14:14
Based on the demo_inotify.c program by Michael Kerrisk
#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;
" 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
" 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'

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

Install required packages

Mac

brew install python3 python@2 neovim
pip install neovim
# Little bits
set -g mouse on
set -g prefix C-Space
bind r source-file ~/.tmux.conf
bind-key C-Space last-window
set -g base-index 0
# linux only
# set-option -ga terminal-overrides ",xterm-256color:Tc"
@Callisto13
Callisto13 / README.md
Last active November 16, 2022 14:32
Set up a new repo with preferred labels

Script using https://github.com/clok/ghlabels to apply preferred labels to new repos, or update existing ones.

Usage:

./labels.sh -c labelcfg.yaml \
  -r <org>/<name> \
  -r <user/name>