Skip to content

Instantly share code, notes, and snippets.

@gujiaxi
gujiaxi / playlist.pls
Created February 24, 2012 02:17
Watch TV over IPv6
[playlist]
NumberOfEntries=89
File1=http://[2001:da8:8000:6007::242]:3002
Title1=中央-1综合频道
File2=http://[2001:da8:8000:6007::242]:3003
Title2=中央-2经济频道
File3=http://[2001:da8:8000:6007::241]:3065
Title3=中央-3综艺频道
File4=http://[2001:da8:8000:6007::241]:3066
Title4=中央-4国际频道
@gujiaxi
gujiaxi / .vimrc
Last active May 13, 2016 06:28
Vim config for remote servers.
set nocompatible " Use Vim defaults
set backspace=indent,eol,start " reasonable backspace in insert mode
set modelines=0 " Modelines are a security hazard
" Formatting
set expandtab " Automatically expand tabs to spaces
set tabstop=2 " tab width
set shiftwidth=2 " wide, otherwise it's tabstop wide
@gujiaxi
gujiaxi / protocol.html
Created October 17, 2012 14:04
What is a Protocol?
<!doctype html public "-//w3c//dtd html 4.0 transitional//en">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<meta name="Author" content="Jim Kurose">
<meta name="GENERATOR" content="Mozilla/4.61 [en] (Win98; I) [Netscape]">
<title>What is a protocol?</title>
</head>
<body>
@gujiaxi
gujiaxi / error503.html
Created October 17, 2012 14:14
Error 503
<!DOCTYPE html>
<html lang=en>
<meta charset=utf-8>
<meta name=viewport content="initial-scale=1, minimum-scale=1, width=device-width">
<title>Error 503 (Server Error)!!1</title>
<style>
*{margin:0;padding:0}html,code{font:15px/22px arial,sans-serif}html{background:#fff;color:#222;padding:15px}body{margin:7% auto 0;max-width:390px;min-height:180px;padding:30px 0 15px}* > body{background:url(//www.google.com/images/errors/robot.png) 100% 5px no-repeat;padding-right:205px}p{margin:11px 0 22px;overflow:hidden}ins{color:#777;text-decoration:none}a img{border:0}@media screen and (max-width:772px){body{background:none;margin-top:0;max-width:none;padding-right:0}}
</style>
<a href=//www.google.com/><img src=//www.google.com/images/errors/logo_sm.gif alt=Google></a>
<p><b>503.</b> <ins>That’s an error.</ins>
#!/usr/bin/env python
# -*- coding: utf-8 -*-
bookList = {}
bookName = ''
clippings = open('1524.txt', 'r')
line = clippings.readline()
bookTitle = line[:-1]
bookList[bookTitle] = line
while 1:
@gujiaxi
gujiaxi / minttyrc
Created May 5, 2015 03:25
mintty config file
BoldAsFont=yes
CursorType=block
AllowBlinking=yes
Font=Input
FontIsBold=no
FontHeight=11
Columns=75
Rows=25
Term=xterm-256color
@gujiaxi
gujiaxi / .tmux.conf
Last active March 10, 2016 03:30
Minimalist Tmux Config for Servers
set -g prefix C-a
unbind C-b
bind C-a send-prefix
# navigate panes
bind h select-pane -L
bind j select-pane -D
bind k select-pane -U
bind l select-pane -R
@gujiaxi
gujiaxi / cVimrc
Last active September 3, 2016 07:32
cVim (Vim for Google Chrome) configuration
let blacklists = ["*://mail.google.com/*","*://inbox.google.com/*","*://www.inoreader.com/*","*://twitter.com/*","*://ide.c9.io/*"]
@gujiaxi
gujiaxi / GoogleMaps
Created March 1, 2016 11:43
Set markers on Google Maps.
<!DOCTYPE html>
<html>
<head>
<meta name="viewport" content="initial-scale=1.0, user-scalable=no">
<meta charset="utf-8">
<title>Google Maps</title>
<style>
html, body {
height: 100%;
margin: 0;
@gujiaxi
gujiaxi / gist:c2c16fed258b98b3b46b987890ab63a8
Created May 28, 2016 04:34 — forked from barik/gist:3140646
Sumatra PDF with Emacs
(custom-set-variables
;; custom-set-variables was added by Custom.
;; If you edit it by hand, you could mess it up, so be careful.
;; Your init file should contain only one such instance.
;; If there is more than one, they won't work right.
'(TeX-PDF-mode t)
'(TeX-master nil)
'(TeX-source-correlate-method (quote synctex))
'(TeX-source-correlate-mode t)
'(TeX-source-correlate-start-server (quote ask))