Skip to content

Instantly share code, notes, and snippets.

Drifting down a road

PaddingMe paddingme

Drifting down a road
Block or report user

Report or block paddingme

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
paddingme / git.plugin.zsh
Created Sep 2, 2019 — forked from DavidToca/git.plugin.zsh
oh-my-zsh git alias
View git.plugin.zsh
# Aliases
alias g='git'
compdef g=git
alias gst='git status'
compdef _git gst=git-status
alias gl='git pull'
compdef _git gl=git-pull
alias gup='git fetch && git rebase'
compdef _git gup=git-fetch
alias gp='git push'
View gist:ebc9e56610bafb92f58f427f6f8481c5
"eslint.autoFixOnSave": true,
// An array of language ids which should be validated by ESLint
"eslint.validate": [
// jsx
// vue
"language": "vue",
"autoFix": true
paddingme / strLen.js
Created May 10, 2019 — forked from Alex1990/strLen.js
Count a string(mixing English and Chinese characters) length, and this is a rough function.
View strLen.js
* Description: Count a string (mixing English and Chinese characters) length.
* A basic and rough function.
* Performance:
* Multiple methods performance test on
* You can see that using regexp to check range is very slow from the above test page.
function strLen(str) {
var count = 0;
paddingme / rename.js
Created Apr 29, 2019 — forked from scriptex/rename.js
Rename all files in a folder with NodeJS
View rename.js
const fs = require('fs');
const path = require('path');
const args = process.argv.slice(2);
const dir = args[0];
const match = RegExp(args[1], 'g');
const replace = args[2];
const files = fs.readdirSync(dir);
.filter(file => file.match(match))
View running_app_in_production_locally.markdown
  1. Add gem 'rails_12factor' to your Gemfile. This will add error logging and the ability for your app to serve static assets.
  2. bundle
  3. Run RAILS_ENV=production rake db:create db:migrate db:seed
  4. Run rake secret and copy the output
  5. From the command line: export SECRET_KEY_BASE=output-of-rake-secret
  6. To precompile your assets, run rake assets:precompile. This will create a folder public/assets that contains all of your assets.
  7. Run RAILS_ENV=production rails s and you should see your app.

Remember to clobber your assets (rake assets:clobber) and re-precompile (rake assets:precompile) if you make changes.


How to setup Shadowsocks on your Ubuntu server

Your school or company network may block the access to a few specific websites. To solve this problem, I'd highly recommend Shadowsocks, since it is the easiest proxy tool I've ever found, and it's FREE (of course iff you have your own server running).

First, ssh to your server, and make sure you have Python and pip installed. If you have Python but not pip, install it using the following command

$ sudo apt-get install python3-pip
paddingme /
Created Oct 23, 2018 — forked from tomysmile/
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
paddingme / .git-commit-blog.txt
Created Jan 3, 2018 — forked from yulijia/.git-commit-blog.txt
git commit template in Chinese
View .git-commit-blog.txt
# Type(<scope>): <subject>
# <body>
# <footer>
# type字段
# add 增加新博客/页面(add new post/page)
# correct 改错别字/语法(correct spelling/grammar )
# update 更新内容(update content)
paddingme / emojis.json
Created Dec 25, 2017 — forked from oliveratgithub/emojis.json
Emoji-list with emojis, names, shortcodes, unicode and html entities [massive list]
View emojis.json
"emojis": [
{"emoji": "👩‍👩‍👧‍👧", "name": "family_mothers_two_girls", "shortname": "", "unicode": "", "html": "&#128105;&zwj;&#128105;&zwj;&#128103;&zwj;&#128103;", "category": "p", "order": ""},
{"emoji": "👩‍👩‍👧‍👦", "name": "family_mothers_children", "shortname": "", "unicode": "", "html": "&#128105;&zwj;&#128105;&zwj;&#128103;&zwj;&#128102;", "category": "p", "order": ""},
{"emoji": "👩‍👩‍👦‍👦", "name": "family_mothers_two_boys", "shortname": "", "unicode": "", "html": "&#128105;&zwj;&#128105;&zwj;&#128102;&zwj;&#128102;", "category": "p", "order": ""},
{"emoji": "👨‍👩‍👧‍👧", "name": "family_two_girls", "shortname": "", "unicode": "", "html": "&#128104;&zwj;&#128105;&zwj;&#128103;&zwj;&#128103;", "category": "p", "order": ""},
{"emoji": "👨‍👩‍👧‍👦", "name": "family_children", "shortname": "", "unicode": "", "html": "&#128104;&zwj;&#128105;&zwj;&#128103;&zwj;&#128102;", "category": "p", "order": ""},
{"emoji": "👨‍👩‍👦‍👦", "name": "family_two_boys", "shortname": "", "unicode": "", "html": "&#128104;&zw
paddingme / xxf.zsh-theme
Created Aug 23, 2017 — forked from xfanwu/xxf.zsh-theme
Yet another theme for oh-my-zsh
View xxf.zsh-theme
# Copy and self modified from ys.zsh-theme, the one of default themes in master repository
# Clean, simple, compatible and meaningful.
# Tested on Linux, Unix and Windows under ANSI colors.
# It is recommended to use with a dark background and the font Inconsolata.
# Colors: black, red, green, yellow, *blue, magenta, cyan, and white.
# 2 Jul 2015 - Xiaofan
# Machine name.
function box_name {
You can’t perform that action at this time.