Skip to content

Instantly share code, notes, and snippets.

View dotku's full-sized avatar
🧐
I'm busy... I may be slow to respond.

Weijing Jay Lin dotku

🧐
I'm busy... I may be slow to respond.
  • Meta
  • San Francisco, CA, USA
  • 01:30 (UTC -12:00)
View GitHub Profile
@dotku
dotku / .bashrc
Created February 3, 2016 21:19
Windows 下的 bashrc
# 把这个文件复制黏贴到系统的 .bashrc,或放在 C:\Users\%USERNAME% 目录下
# gac 添加,并备注
# gps 上传到代码仓库
alias gfp='git fetch && git pull' # 下载更新
alias gac='git add . && git commit -m' # 栗子: gac '举了一个栗子'
alias gps='git push' # 栗子: gp 栗子源 栗子分支
@dotku
dotku / template-engine-in-projects
Last active February 4, 2016 04:42
各框架的默认模板引擎对照表
/**
# template-engine-in-projects
一般中国的公司都喜欢使用自己开发的模板引擎,而海外的则比较喜欢开源的模板引擎
## Freamworks
Laveral - Blade
Express - Jade
@dotku
dotku / geolite2.sql
Created February 5, 2016 08:15
GeoLite2 SQL Schema
CREATE TABLE GeoLite2 (
geoname_id INT(10) UNSIGNED AUTO_INCREMENT PRIMARY KEY,
locale_code VARCHAR(10) NOT NULL,
continent_code VARCHAR(10) NOT NULL,
continent_name VARCHAR(10) NOT NULL,
country_iso_code VARCHAR(10) NOT NULL,
country_name VARCHAR(50) NOT NULL,
subdivision_1_iso_code VARCHAR(10),
subdivision_1_name VARCHAR(50),
subdivision_2_iso_code VARCHAR(10),
@dotku
dotku / .block
Last active November 27, 2016 08:01
THINKPHP_TEMPLATE
license: mit
@dotku
dotku / solution 1.md
Last active March 10, 2016 08:54
配置phpmyadmin使登录时可填写IP管理多台MySQL

登陆phpMyAdmin时输入服务器ip地址、用户名、密码

缺点:登陆操作比较繁琐,而且切换服务器时须首先退出当前所登陆的服务器

/**
 * allow login to any user entered server in cookie based authentication
 *
 * @global boolean $cfg[‘AllowArbitraryServer’]
 */

$cfg['AllowArbitraryServer'] = true;

@dotku
dotku / index.html
Last active March 4, 2016 00:50 — forked from bsudekum/index.html
Custom Marker Numbers
<!DOCTYPE html>
<html>
<head>
<meta name='viewport' content='width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no' />
<script src='http://api.tiles.mapbox.com/mapbox.js/v1.2.0/mapbox.js'></script>
<link href='http://api.tiles.mapbox.com/mapbox.js/v1.2.0/mapbox.css' rel='stylesheet' />
<!--[if lte IE 8]>
<link href='//api.tiles.mapbox.com/mapbox.js/v1.2.0/mapbox.ie.css' rel='stylesheet' >
<![endif]-->
<style>
@dotku
dotku / ubuntu-php.md
Last active June 26, 2019 03:57
ubuntu common used command

# Ubuntu 默认下无法支持 mysql 升级到最高版本,需要通过 ppa 库(据说是 Debian 的)来升级程序

sudo add-apt-repository ppa:nijel/phpmyadmin
sudo apt-get update

sudo apt-get install php5-mysqlnd

@dotku
dotku / Linux 常用命令锦集.md
Last active February 22, 2017 11:11
Linux 相关的内容
  1. 查看版本

     # Finding your kernel release
     $ uname -r
     > 3.16.0-34-generic
     
     # Finding your distribution release
     $ lsb_release -a
     > Distributor ID: Ubuntu  
    

> Description: Ubuntu 14.10

@dotku
dotku / .bash_profile
Created April 6, 2016 03:42
bash_profile 的例子
PATH=$PATH:"/C/Program Files/nodejs"
export PATH
@dotku
dotku / Install MongoDB as Windows Service.md
Last active April 15, 2016 06:27
Create MongoDB Service in Windows (在 Windows 中安装 MongoDB 服务)

[En]

  1. You must create related path at first, C:\data\db for example.
  2. Go to your mongodb bin path, use following command to create service

mongod --logpath "C:\data\dbConf\mongodb.log" --logappend --dbpath "C:\data\db" --port 27017 --serviceName mongodb_new --serviceDisplayName mongodb_new --install

  1. Then go to windows service manager, start your mongodb_new service.

[Zh]

  1. 你必须先创建相关的文件与文件夹及,比如 C:\data\db