Skip to content

Instantly share code, notes, and snippets.

@zhchbin
zhchbin / .vimrc
Last active July 23, 2022 13:14
vimrc
set nocompatible " be iMproved, required
filetype off " required
" set the runtime path to include Vundle and initialize
set rtp+=~/.vim/bundle/Vundle.vim
call vundle#begin()
" let Vundle manage Vundle, required
Plugin 'VundleVim/Vundle.vim'
@zhchbin
zhchbin / index.html
Created February 10, 2013 10:55
Node-Webkit API Demo: Window.capturePage
<html>
<body style="background: #333">
<script >
var gui = require('nw.gui');
var win = gui.Window.get();
function takeSnapshot() {
win.capturePage(function(img) {
var popWindow = gui.Window.open('popup.html',
{width: 420, height: 300});
popWindow.on('loaded', function() {
@zhchbin
zhchbin / index.html
Created January 13, 2013 05:40
Hide icon from task bar. For node-webkit #251
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Testing</title>
<script type="text/javascript">
var gui = require('nw.gui');
var win = gui.Window.get();
gui.Window.open('pop.html', {
show_in_taskbar: false
});
@zhchbin
zhchbin / index.html
Created December 4, 2012 07:21
Node-webkit hotkey api proposal(Refactor)
<!DOCTYPE>
<html>
<head>
<title>Hotkey Demo</title>
<script type="text/javascript">
function log(msg) {
document.getElementById('log').textContent += msg + '\n';
}
function error(msg) {
@zhchbin
zhchbin / index.html
Created November 30, 2012 02:09
Node-webkit hotkey api proposal
<!DOCTYPE>
<html>
<head>
<title>Hotkey Demo</title>
<script type="text/javascript" src='keymap.js'></script>
<script type="text/javascript">
function log(message) {
document.getElementById('log').textContent += message + '\n';
}
var gui = require('nw.gui');