Skip to content

Instantly share code, notes, and snippets.

View Hyvi's full-sized avatar
🎯
Focusing

Hyvi Hyvi

🎯
Focusing
  • huawei Inc
  • china
View GitHub Profile
/**
* 遗留的问题: 这是utf-8 ??
* 关于encodeURIComponent 与 encodeURI 的最佳实践
* http://stackoverflow.com/questions/75980/best-practice-escape-or-encodeuri-encodeuricomponent
*
Unicode Strings
In most browsers, calling window.btoa on a Unicode string will cause a Character Out Of Range exception.
To avoid this, consider this pattern, noted by Johan Sundström
@Hyvi
Hyvi / cutcode.sh
Last active January 19, 2019 13:56
用于截图部分代码,粘贴到keynote ///
#!/bin/bash
# 先安装highlight, "brew install highlight"
# Parse arguments
usage() {
echo "Usage: $0 [-h] [-v] [-f FILE] [-k fontsize] [-s startline] [-e endline]"
echo " -h Help. Display this message and quit."
echo " -v Version. Print version number and quit."
echo " -k Specify font-size."
echo " -f Specify file FILE."
echo " -s Specify the line number of the file that start from ."
@Hyvi
Hyvi / dabblet.html
Created June 2, 2013 02:43 — forked from anonymous/dabblet.html
Untitled
<P>&nbsp;&nbsp;秦奋忏悔了4个小时,牧师受不了了。<br><br>&nbsp;&nbsp;牧师说:我们的教堂太小了,装不下他那么大的罪恶,前面还有一个比较大的教堂。
origin 学习
hyvi:~/.vim$ tree -L 2
.
├── autoload
│   ├── pathogen.vim
│   └── zencoding.vim
├── bundle
│   ├── gist-vim
│   ├── matchit.zip
│   ├── nerdtree
@Hyvi
Hyvi / nginx_static_post_405.conf
Created August 31, 2012 06:59
A static page can not handle POST, so nginx return 405. There is workaround...
# work-around 405 for POST to static URL
upstream my-static-server-name {
server 11.111.111.111:8080;
}
.
.
.
<html>
<head>
<title> Test </title>
<style type="text/css">
.left{width:200px;
height:300px;
background-color:red;
float:left;
}
.middle {
vim_plugin_task "ack.vim", "git://github.com/mileszs/ack.vim.git"
vim_plugin_task "color-sampler", "git://github.com/vim-scripts/Color-Sampler-Pack.git"
vim_plugin_task "conque", "http://conque.googlecode.com/files/conque_1.1.tar.gz"
vim_plugin_task "fugitive", "git://github.com/tpope/vim-fugitive.git"
vim_plugin_task "git", "git://github.com/tpope/vim-git.git"
vim_plugin_task "haml", "git://github.com/tpope/vim-haml.git"
vim_plugin_task "indent_object", "git://github.com/michaeljsmith/vim-indent-object.git"
vim_plugin_task "javascript", "git://github.com/pangloss/vim-javascript.git"
vim_plugin_task "nerdtree", "git://github.com/wycats/nerdtree.git"
vim_plugin_task "nerdcommenter", "git://github.com/ddollar/nerdcommenter.git"
@Hyvi
Hyvi / .vimrc
Created March 4, 2012 09:12
vim配置
nmap <F2> a<C-R>=strftime("%c")<CR><Esc>
"http://stackoverflow.com/questions/69998/tabs-and-spaces-in-vim
set tabstop=4
set shiftwidth=4
set expandtab
call pathogen#infect()
syntax on
filetype plugin indent on
@Hyvi
Hyvi / 12306AutoLogin.user.js
Created January 17, 2012 02:21 — forked from kevintop/12306AutoLogin.user.js
12306 Auto Login
/*
12306 Auto Login => A javascript snippet to help you auto login 12306.com.
Copyright (C) 2011 Kevintop
Includes jQuery
Copyright 2011, John Resig
Dual licensed under the MIT or GPL Version 2 licenses.
http://jquery.org/license
Includes 12306.user.js
问题:
hadoop能正常的启动,但是在mapreduce的时候出现
Lost tracker错误。datanode进程中只有一个hadoop进程。
err信息 :
#
# A fatal error has been detected by the Java Runtime Environment:
#