(Several of these git examples have been extracted from the book 'Pragmatic guide to GIT' of Travis Swicegood )
git config --global user.name "Fernando Guillen"
git config --global user.email "fguillen.mail+spam@gmail.com"
cd /develop/myrepo
| L1 cache reference 0.5 ns | |
| Branch mispredict 5 ns | |
| L2 cache reference 7 ns | |
| Mutex lock/unlock 25 ns | |
| Main memory reference 100 ns | |
| Compress 1K bytes with Zippy 3,000 ns | |
| Send 2K bytes over 1 Gbps network 20,000 ns | |
| Read 1 MB sequentially from memory 250,000 ns | |
| Round trip within same datacenter 500,000 ns | |
| Disk seek 10,000,000 ns |
| !------------------------------------------------------------------------------- | |
| ! Xft settings | |
| !------------------------------------------------------------------------------- | |
| Xft.dpi: 96 | |
| Xft.antialias: false | |
| Xft.rgba: rgb | |
| Xft.hinting: true | |
| Xft.hintstyle: hintslight |
| # Postgresql 9.1 conf | |
| # by http://www.postgresql.org/docs/9.1/interactive/monitoring-stats.html#MONITORING-STATS-FUNCS-TABLE | |
| # | |
| # Server specific parameters | |
| # Example: psql.pg_stat_get_bgwriter_timed_checkpoints | |
| # | |
| UserParameter=psql.pg_stat_get_bgwriter_timed_checkpoints,psql -d neiron -t -c "SELECT pg_stat_get_bgwriter_timed_checkpoints() FROM pg_database WHERE datname='${1-"neiron"}'" | |
| UserParameter=psql.pg_stat_get_bgwriter_requested_checkpoints,psql -d neiron -t -c "SELECT pg_stat_get_bgwriter_requested_checkpoints() FROM pg_database WHERE datname='${1-"neiron"}'" | |
| UserParameter=psql.pg_stat_get_bgwriter_buf_written_checkpoints,psql -d neiron -t -c "SELECT pg_stat_get_bgwriter_buf_written_checkpoints() FROM pg_database WHERE datname='${1-"neiron"}'" | |
| UserParameter=psql.pg_stat_get_bgwriter_buf_written_clean,psql -d neiron -t -c "SELECT pg_stat_get_bgwriter_buf_written_clean() FROM pg_database WHERE datname='${1-"neiron"}'" |
| #include <stdio.h> | |
| #include <stdlib.h> | |
| #include <stdint.h> | |
| #include <string.h> | |
| struct stock5Min | |
| { | |
| unsigned short monthDay; // 月日 | |
| unsigned short hourMin; // 小时, 分钟 |
| /* | |
| ## 对象健身操 | |
| http://www.infoq.com/cn/minibooks/thoughtworks-anthology | |
| ###规范 | |
| 1. 方法只使用一级缩进。 | |
| 1. 全部符合要求 | |
| 1. 大部分通过方法提取做到,有的带yield的语句块不好提取,幸好一些Linq方法可以用来抽象一些集合操作。 | |
| 1. 所有方法都尽量控制在5行以内,不包含空行和括号单独占的行 |
| source :rubygems | |
| gem "eventmachine", "0.12.10" | |
| gem "rack" |
| /* | |
| 12306 Auto Query => A javascript snippet to help you book tickets online. | |
| Copyright (C) 2011 Jingqin Lynn | |
| Includes jQuery | |
| Copyright 2011, John Resig | |
| Dual licensed under the MIT or GPL Version 2 licenses. | |
| http://jquery.org/license | |
| Includes Sizzle.js |
| // From Dribbble.com | |
| // Keyboard shortcuts for browsing pages of lists | |
| // 使 WillPaginate 支持用左右键翻页 | |
| (function($) { | |
| $(document).keydown(handleKey); | |
| function handleKey(e){ | |
| var left_arrow = 37; | |
| var right_arrow = 39; | |
| if (e.target.localName == 'body' || e.target.localName == 'html') { |