This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
" $ vim -u NONE -g -S thisfile.vim | |
let s:RAND_MAX = 32767 | |
let s:seed = 0 | |
function! s:rand() | |
let s:seed = s:seed * 214013 + 2531011 | |
return (s:seed < 0 ? s:seed - 0x80000000 : s:seed) / 0x10000 % 0x8000 | |
endfunction | |
function! s:random() | |
return s:rand() / (s:RAND_MAX * 1.0) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
" require: term.vim | |
" http://www.vim.org/scripts/script.php?script_id=2812 | |
autocmd CursorMoved,CursorMovedI * call s:update_scrollbar_absolute() | |
" how to get curwin->w_winrow and curwin->w_wincol? | |
function! s:update_scrollbar_absolute() | |
let winline = winline() | |
let wincol = wincol() | |
let winwidth = &columns |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Ubuntu 11.10 vim-7.3.346 | |
Breakpoint 1, find_var_in_ht (ht=0x861308, varname=0xe39da0 "autofmt#compat#formatexpr", writing=0) at eval.c:19590 | |
19590 ___hi = hi; | |
(gdb) print ___hi | |
$1 = (hashitem_T *) 0x0 | |
(gdb) n | |
19591 printf("YYY: 0: %p %p\n", hi, hi->hi_key); | |
(gdb) print ___hi | |
$2 = (hashitem_T *) 0x9e7f80 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
window.___jsl=window.___jsl||{}; | |
window.___jsl.h=window.___jsl.h||'m;\/_\/apps-static\/_\/js\/widget\/__features__\/rt=j\/ver=Xs6ZTsE55EQ.en.\/am=!oQWlKN7CPkX3SB93\/d=1\/'; | |
window.___jsl.l=[]; | |
window.__GOOGLEAPIS=window.__GOOGLEAPIS||{}; | |
window.__GOOGLEAPIS.gwidget=window.__GOOGLEAPIS.gwidget||{}; | |
window.__GOOGLEAPIS.gwidget.superbatch=false;window.__GOOGLEAPIS.iframes=window.__GOOGLEAPIS.iframes||{}; | |
window.__GOOGLEAPIS.iframes.plusone=window.__GOOGLEAPIS.iframes.plusone_m=window.__GOOGLEAPIS.iframes.plusone||{url:':socialhost:/u/:session_index:/_/+1/fastbutton',params:{count:'',size:'',url:''}};window.___gpq=[]; | |
window.gapi=window.gapi||{}; | |
window.gapi.plusone=window.gapi.plusone||(function(){ | |
function f(n){return function(){window.___gpq.push(n,arguments)}} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# Disable touchpad | |
# Reference: http://d.hatena.ne.jp/hosikiti/20101002/1285987199 | |
# Add this script to Startup Applications. | |
# You can see device list with `xinput list`. | |
# This is for my PC. | |
DEVICE="SynPS/2 Synaptics TouchPad" | |
# ON |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# vimball archiver | |
# vmb.sh file1 file2 ... > out.vmb | |
echo '" Vimball Archiver by Charles E. Campbell, Jr., Ph.D.' | |
echo 'UseVimball' | |
echo 'finish' | |
for i in $*; do | |
echo "$i [[[1" | |
wc -l $i | cut -d ' ' -f 1 | |
cat $i |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!vim -u | |
let s:calendar_list = [ | |
\ ['Australian Holidays', 'en.australian#[email protected]'], | |
\ ['Austrian Holidays', 'en.austrian#[email protected]'], | |
\ ['Brazilian Holidays', 'en.brazilian#[email protected]'], | |
\ ['Canadian Holidays', 'en.canadian#[email protected]'], | |
\ ['China Holidays', 'en.china#[email protected]'], | |
\ ['Christian Holidays', 'en.christian#[email protected]'], | |
\ ['Danish Holidays', 'en.danish#[email protected]'], |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!vim -u | |
let s:calendar_list = [ | |
\ ['アルゼンチン', 'Días festivos de Argentina', 'D%C3%ADas%20festivos%20de%20Argentina'], | |
\ ['オーストラリア', 'Australia Holidays', 'Australia+Holidays'], | |
\ ['オーストリア (ドイツ語)', 'Feiertage in Österreich', 'Feiertage%20in%20%C3%96sterreich'], | |
\ ['ベルギー (オランダ語)', 'Belgische feestdagen', 'Belgische+feestdagen'], | |
\ ['ベルギー (フランス語)', 'Calendrier des jours fériés en Belgique', 'Calendrier%20des%20jours%20f%C3%A9ri%C3%A9s%20en%20Belgique'], | |
\ ['ブルガリア', 'Празници в България', '%D0%9F%D1%80%D0%B0%D0%B7%D0%BD%D0%B8%D1%86%D0%B8%20%D0%B2%20%D0%91%D1%8A%D0%BB%D0%B3%D0%B0%D1%80%D0%B8%D1%8F'], | |
\ ['ブラジル', 'Feriados no Brasil', 'Feriados+no+Brasil'], |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
" Usage: | |
" Copy this file to your ~/.vim/autoload directory. | |
" :edit oldfile | |
" :new newfile | |
" :call wdiff#highlight(2, 1) " wdiff#highlight(winnr1, winnr2) | |
let s:save_cpo = &cpo | |
set cpo&vim | |
function wdiff#highlight(Awinnr, Bwinnr) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python3 | |
import io | |
import re | |
import urllib.request | |
import urllib.error | |
import json | |
import html.entities | |
import argparse |