Skip to content

Instantly share code, notes, and snippets.

View neocanable's full-sized avatar
🏠
Working from home

Neo neocanable

🏠
Working from home
View GitHub Profile
@neocanable
neocanable / mac-setup-redis.md
Created March 4, 2021 11:17 — forked from tomysmile/mac-setup-redis.md
Brew install Redis on Mac

type below:

brew update
brew install redis

To have launchd start redis now and restart at login:

brew services start redis
# 1) Point *.example.com in your DNS setup to your server.
#
# 2) Setup an Apache vhost to catch the star pointer:
#
# <VirtualHost *:80>
# ServerName example.com
# ServerAlias *.example.com
# </VirtualHost>
#
# 3) Set the current account from the subdomain
@neocanable
neocanable / overlay.rb
Created January 29, 2013 06:53
Rmagick 图片叠加图片
require 'rubygems'
require 'rmagick'
include Magick
# customise user avatar or app icon
def merge_2_image(bg_path, icon_path)
background = Image.read(bg_path)[0]
icon = Image.read(icon_path)[0]
@neocanable
neocanable / vim-tips.vim
Created January 17, 2013 07:11
vim-tips
#
# control font-size with ctrl-up and ctrl-down
#
nnoremap <C-UP> :silent! let &guifont = substitute(
\ &guifont,
\ ':h\zs\d\+',
\ '\=eval(submatch(0)+1)',
\ '')<CR>
nnoremap <C-Down> :silent! let &guifont = substitute(
\ &guifont,