Skip to content

Instantly share code, notes, and snippets.

View caesar0301's full-sized avatar

陈夏明 caesar0301

View GitHub Profile
" ir_black color scheme
" More at: http://blog.infinitered.com/entries/show/8
" ********************************************************************************
" Standard colors used in all ir_black themes:
" Note, x:x:x are RGB values
"
" normal: #f6f3e8
"
function! CustomizedTabLine()
let s = ''
let t = tabpagenr()
let i = 1
while i <= tabpagenr('$')
let buflist = tabpagebuflist(i)
let winnr = tabpagewinnr(i)
let s .= '%' . i . 'T'
let s .= (i == t ? '%1*' : '%2*')
let s .= ' '
" Vim color file --- psc (peak sea color) "Lite version"
" Maintainer: Pan, Shi Zhu <Go to the following URL for my email>
" URL: http://vim.sourceforge.net/scripts/script.php?script_id=760
" Last Change: 5 Feb 2010
" Version: 3.4
"
" Comments and e-mails are welcomed, thanks.
"
" The peaksea color is simply a colorscheme with the default settings of
" the original ps_color. Lite version means there's no custom settings

VIM KEYBOARD SHORTCUTS

MOVEMENT

h        -   Move left
j        -   Move down
k        -   Move up
l        -   Move right
$        -   Move to end of line
0        -   Move to beginning of line (including whitespace)
@caesar0301
caesar0301 / build-gcc.sh
Created May 10, 2022 15:08 — forked from jeetsukumaran/build-gcc.sh
Build and Install GCC Suite from Scratch
#! /bin/bash
GCC_VERSION="5.2.0"
WORKDIR="$HOME/src/"
INSTALLDIR="/platform"
## NOTE: XCode must be installed (through App Store) and the following run to install command-line tools.
## THIS IS IMPORTANT! Among other things, it creates '/usr/include' and installs the system header files.
# xcode-select --install
@caesar0301
caesar0301 / sslocal
Created July 27, 2019 10:48
Init.d script for shadowsocks with local python client
#!/bin/bash
# Author: lynnyq <lynnyq@gmail.com>
name=sslocal
BIN=/usr/local/bin/sslocal
conf=/etc/shadowsocks-libev/local.json
start(){
$BIN -c $conf -d start
RETVAL=$?
if [ "$RETVAL" = "0" ]; then
@caesar0301
caesar0301 / cloudSettings
Last active December 16, 2021 16:36
Visual Studio Code Settings Sync Gist
{"lastUpload":"2021-12-16T16:36:27.333Z","extensionVersion":"v3.4.3"}
@caesar0301
caesar0301 / plugin.py
Created February 23, 2017 08:54 — forked from will-hart/plugin.py
A simple python plugin system using a custom metaclass
# a simple Python plugin loading system
# see http://stackoverflow.com/questions/14510286/plugin-architecture-plugin-manager-vs-inspecting-from-plugins-import
class PluginMount(type):
"""
A plugin mount point derived from:
http://martyalchin.com/2008/jan/10/simple-plugin-framework/
Acts as a metaclass which creates anything inheriting from Plugin
"""
@caesar0301
caesar0301 / springer-free-maths-books.md
Created January 5, 2016 02:07 — forked from bishboria/springer-free-maths-books.md
Springer made a bunch of books available for free, these were the direct links
@caesar0301
caesar0301 / fix_lvm_volume_error.md
Created January 25, 2015 06:25
Fix LVM physical volume definition after removing /dev/sdb
>pvs
/dev/sdc1: read failed after 0 of 2048 at 0: Input/output error
PV         VG   Fmt  Attr PSize   PFree
/dev/sdb   data lvm2 a--  330.00g    0

by typing:

echo 1 > /sys/block/sdc/device/delete