:tabnew
- new blank tab:tabedit [file]
- open file in tab
gt
(:tabn
) - next tab
#!/usr/bin/env ruby | |
File.open("your_file.md", 'r') do |f| | |
f.each_line do |line| | |
forbidden_words = ['Table of contents', 'define', 'pragma'] | |
next if !line.start_with?("#") || forbidden_words.any? { |w| line =~ /#{w}/ } | |
title = line.gsub("#", "").strip | |
href = title.gsub(" ", "-").downcase | |
puts " " * (line.count("#")-1) + "* [#{title}](\##{href})" |
key:"string value" | |
int_key:22 |
#!/bin/bash | |
# | |
# git-su - Git Switch User | |
# ======================== | |
# | |
# git-su switches user and sshCommand in the current repository. | |
# | |
# USAGE | |
# ----- | |
# |
/* | |
* ===================================================================================== | |
* | |
* Filename: camera.c | |
* | |
* Description: | |
* | |
* Version: 1.0 | |
* Created: 2013年08月23日 15时54分17秒 | |
* Revision: none |
/** | |
* | |
* MD5 (Message-Digest Algorithm) | |
* http://www.webtoolkit.info/ | |
* | |
**/ | |
var MD5 = function (string) { | |
function RotateLeft(lValue, iShiftBits) { |
/* | |
* Simple MD5 implementation | |
* | |
* Compile with: gcc -o md5 -O3 -lm md5.c | |
*/ | |
#include <stdio.h> | |
#include <stdlib.h> | |
#include <string.h> | |
#include <stdint.h> | |
#!/bin/sh | |
# | |
# Usage: whenever.sh [pattern] [command] | |
# | |
# Executes a command whenever files matching the pattern are closed in write | |
# mode. "{}" in the command is replaced with the matching filename (via xargs). | |
# Requires inotifywait from inotify-tools. | |
# | |
# For example, |
#!/bin/bash | |
# Script for installing tmux on systems where you don't have root access. | |
# tmux will be installed in $HOME/local/bin. | |
# It's assumed that wget and a C/C++ compiler are installed. | |
# exit on error | |
set -e | |
TMUX_VERSION=1.8 |