Skip to content

Instantly share code, notes, and snippets.

@rambolee
rambolee / statistic_mysql_innodb_size.sql
Created October 25, 2016 09:45
统计 MySQL 表大小
SELECT CONCAT(table_schema,'.',table_name) AS 'Table Name',
CONCAT(ROUND(table_rows/1000000,2),'M') AS 'Number of Rows',
CONCAT(ROUND(data_length/(1024*1024),2),'M') AS 'Data Size' ,
CONCAT(ROUND(index_length/(1024*1024),2),'M') AS 'Index Size' ,
CONCAT(ROUND((data_length+index_length)/(1024*1024),2),'M') AS 'Total'
FROM information_schema.TABLES
WHERE table_schema='ump' order by Total desc;
@rambolee
rambolee / sublime_text_3_configurations_note.md
Last active January 6, 2017 03:49
sublime text 3 configuration notes

sublime text 3 configuration notes

by searching ‘sublime text 3 for front-end web developer

install package control

ctrl + ~

import urllib.request,os; pf = 'Package Control.sublime-package'; ipp = sublime.installed_packages_path(); urllib.request.install_opener( urllib.request.build_opener( urllib.request.ProxyHandler()) ); open(os.path.join(ipp, pf), 'wb').write(urllib.request.urlopen( 'http://sublime.wbond.net/' + pf.replace(' ','%20')).read())
@rambolee
rambolee / Instructions_Hexo_for_macOS_and_merge_data_from_wordpress.md
Last active October 25, 2016 09:51
Hexo macOS 安装 和 wordpress 配置迁移

Hexo macOS 安装 和 wordpress 配置迁移

安装 node.js 在 macOS 上

安装 nvm

$  $ brew install nvm                                                                                                                          [12:58:24]
Checking out v1.0.1 in /usr/local/Homebrew...
To checkout v1.0.1 in /usr/local/Homebrew run:
  'cd /usr/local/Homebrew && git checkout v1.0.1
@rambolee
rambolee / mtr_for_macOS.md
Last active October 25, 2016 09:53
macOS mtr 用法

macOS mtr 用法

$ brew install mtr
$ mtr
-bash: mtr: command not found

解决方法

@rambolee
rambolee / how_to_fix_update_gwflist_404_error.md
Last active July 9, 2020 00:59
shadowSocks 从 gwflist更新 PAC 时404

shadowSocks 从 gwflist更新 PAC 时404

shadowSocks 从 gwflist更新 PAC 时404

问题:MacOS下ShadowsocksX点击“从GFWList更新PAC”报“Request failed : not found(404)”错误。 查看了 github 的 issue,发现是新问题,但是已经有大神解决了,解决方案如下。
下面是大神的 shell 代码,果断观摩之:

大神的 github 地址

@rambolee
rambolee / configuration_mac_laptop_env_part_1.md
Last active October 25, 2016 10:00
Mac 基础使用环境初始化(一)

Mac 基础使用环境初始化(一)

Console 相关

homebrew 安装

http://brew.sh/index_zh-cn.html
@rambolee
rambolee / git_merge_branch_checklist.md
Last active October 25, 2016 10:04
git 合并代码相关流程

git 合并代码相关流程

  • 提交本地代码(当前branch rambo)完毕。包括本地仓库和远程仓库
  • merge dev,解决与DEV的冲突,然后,提交到本地仓库和远程仓库
  • 切换到dev的branch
  • 拉取远程代码,更新本地环境到最新
  • 解决冲突(可能)
  • merge rambo, 解决与rambo的冲突,然后,提交到本地仓库和远程仓库
  • 切换到rambo,继续干活
@rambolee
rambolee / some_idea_for_replace_irvue.txt
Created October 25, 2016 10:05
irvue 代替品的一些开发思路
irvue 代替品
用swift写一个mac上驻留的服务。
获取 unsplash.com 的高清图片。然后,保存到本地的文件中
定时更换桌面,考虑兼容多屏
api:
https://unsplash.com/napi/photos/curated?page=7&per_page=12&order_by=latest
网站是react写的。挺好的
@rambolee
rambolee / tmux_some_configuration.md
Last active December 21, 2020 05:33
升级配置安装 tmux 遇到的问题

升级配置安装 tmux 遇到的问题

升级tmux的起因: 因为使用下面tmux相关维护脚本时,发现1.8.*的版本的tmux在一些参数支持上不到位。 该脚本很多信息保留不全,导致使用效果不好。所以,需要放弃centos自身yum源中的tmux,然后自己手工source.tar.gz进行安装。

脚本参考: https://segmentfault.com/a/1190000000457385#articleHeader0

tmux 相关脚本

tmuxEnvSaver.sh

@rambolee
rambolee / what_is_php-fpm.md
Last active October 25, 2016 10:25
概念了解:CGI,FastCGI,PHP-CGI与PHP-FPM

概念了解:CGI,FastCGI,PHP-CGI与PHP-FPM

CGI

CGI全称是“公共网关接口”(Common Gateway Interface),HTTP服务器与你的或其它机器上的程序进行“交谈”的一种工具,其程序须运行在网络服务器上。

CGI可以用任何一种语言编写,只要这种语言具有标准输入、输出和环境变量。如php,perl,tcl等。

FastCGI