Skip to content

Instantly share code, notes, and snippets.

View smutch's full-sized avatar

Simon Mutch smutch

View GitHub Profile
@maciejpedzich
maciejpedzich / TableOfContents.astro
Last active June 29, 2024 14:21
Astro Table Of Contents Component + Sample Usage
---
import type { MarkdownHeading } from 'astro';
type Props = {
headings: MarkdownHeading[];
};
type HeadingWithSubheadings = MarkdownHeading & {
subheadings: MarkdownHeading[];
};
@smutch
smutch / meraxes-on-raijin.md
Last active July 21, 2020 01:20
Running Meraxes on Raijin with a new input sim

Meraxes on Raijin

Tested with the following modules:

- Package -----------------------------+- Versions -+- Last mod. ------
gcc/4.9.0                                            2014/07/03  4:40:12
openmpi/4.0.0                                        2019/01/30  4:13:57
cmake/3.14.4                                         2019/05/16 23:37:18
gsl/2.5 2018/06/21 0:53:02
@JayKickliter
JayKickliter / compdb.mk
Created February 28, 2018 21:26
Generate 'compile_commands.json' in Makefile
%.compdb_entry: %.c
@echo " {" > $@
@echo " \"command\": \"cc $(CFLAGS) $(CPPFLAGS) -c $<\"," >> $@
@echo " \"directory\": \"$(CURDIR)\"," >> $@
@echo " \"file\": \"$<\"" >> $@
@echo " }," >> $@
COMPDB_ENTRIES = $(addsuffix .compdb_entry, $(basename $(SOURCES)))
compile_commands.json: $(COMPDB_ENTRIES)
@cszentkiralyi
cszentkiralyi / context_quick_scope.vim
Last active April 16, 2016 07:15
Only enable the quick-scope plugin's highlighting when using the f/F/t/T movements
" Insert into your .vimrc after quick-scope is loaded.
" Obviously depends on <https://github.com/unblevable/quick-scope> being installed.
" Thanks to @VanLaser for cleaning the code up and expanding capabilities to include e.g. `df`
let g:qs_enable = 0
let g:qs_enable_char_list = [ 'f', 'F', 't', 'T' ]
function! Quick_scope_selective(movement)
let needs_disabling = 0
@lazywei
lazywei / install_mosh_locally.sh
Created January 25, 2015 05:30 — forked from xiaom/install_mosh_locally.sh
Install mosh server without root permission
#!/bin/sh
# this script does absolutely ZERO error checking. however, it worked
# for me on a RHEL 6.3 machine on 2012-08-08. clearly, the version numbers
# and/or URLs should be made variables. cheers, zmil...@cs.wisc.edu
mkdir mosh
cd mosh
@shrayasr
shrayasr / pair-program-tmux.md
Last active March 29, 2022 13:58
Pair programming with Tmux

Pair programming with Tmux

Using the same user

User 1

  1. SSH into the box

     user1@user1-machine$ ssh user@host
    
@eteq
eteq / local_build.py
Last active July 3, 2018 14:49
Authorea script to build locally with LaTeX NOTE: updates at https://github.com/eteq/authorea-scripts
#!/usr/bin/env python
from __future__ import division, print_function
"""
This script generates a file to use for building authorea papers, and then runs
latex on them.
Requires python >= 2.6 (3.x should work, too)
The key assumptions are:
@ctechols
ctechols / Page.vim
Last active May 15, 2018 10:48
Capture output from a vim command (like :version or :messages) into a split scratch buffer.
"Examples:
":Page version
":Page messages
":Page ls
"It also works with the :!cmd command and Ex special characters like % (cmdline-special)
":Page !wc %
"Capture and return the long output of a verbose command.
function! s:Redir(cmd)
let output = ""
redir =>> output