Skip to content

Instantly share code, notes, and snippets.

View linjunpop's full-sized avatar
👻
🤗

Jun Lin linjunpop

👻
🤗
View GitHub Profile
@linjunpop
linjunpop / sublime-text-settings.md
Last active December 10, 2015 06:18
Sublime Text 2 Settings
@linjunpop
linjunpop / Whitespace.md
Last active December 10, 2015 16:18
Whitespace

Whitespace is annoying, here's how to deal with it.

Git

Merge

$(master) git merge -Xignore-all-space origin/master
@linjunpop
linjunpop / Change-Default-Date-Format-In-Rails.md
Last active December 10, 2015 19:19
Change default date format in Rails

http://www.ruby-forum.com/topic/57923#47371

ActiveSupport::CoreExtensions::Date::Conversions::DATE_FORMATS.merge!(
  :default => '%m/%d/%Y'
)
ActiveSupport::CoreExtensions::Time::Conversions::DATE_FORMATS.merge!(
  :default => '%m/%d/%Y %I:%M %p',
  :date_time12 => "%m/%d/%Y %I:%M %p",
 :date_time24 => "%m/%d/%Y %H:%M"
@linjunpop
linjunpop / README.md
Last active December 11, 2015 04:18 — forked from agnoster/README.md

agnoster.zsh-theme

A ZSH theme optimized for people who use:

  • Solarized
  • Git
  • Unicode-compatible fonts and terminals (I use iTerm2 + Menlo)

For Mac users, I highly recommend iTerm 2 + Solarized Dark

@linjunpop
linjunpop / github-correct-way.md
Last active October 22, 2021 22:15
Github the correct way.

Use Github, the correct way, IMO

  1. DO NOT commit anything on master, except wording change.
  2. Write descriptive commit messages. (The reason for this change.)
  3. Always use $ git pull --rebase.
  4. DO NOT merge PR raised by yourself.
  5. Close related issue after merge in PR. (Closes #123)
  6. Write down everything in github comments, include links, codes, etc.
  7. Let all tests pass before merge any PR. (CI server FTW)
  8. Add link to related issue in the PR.
@linjunpop
linjunpop / sync-ruby-version.md
Created March 1, 2013 01:48
Sync ruby version between development and staging/production server

Sync ruby version between development and staging/production server

RVM

in config/deploy.rb

set :rvm_ruby_string, -> { File.read('.ruby-version') }
@linjunpop
linjunpop / README.md
Last active December 14, 2015 15:09
Time tracking with Github
@linjunpop
linjunpop / Integrate-backup-with-rails.md
Last active December 14, 2015 21:18
Integrate Backup with Rails
@linjunpop
linjunpop / message.rb
Last active June 23, 2016 04:33
Sidekiq + Grocer
class Message
include Mongoid::Document
include Mongoid::Timestamps
field :alert, type: String
field :badge, type: Integer, default: 0
field :sound, type: String
field :schedule, type: DateTime
field :custom, type: Hash
@linjunpop
linjunpop / install-pandoc.md
Last active July 15, 2018 13:30
Install pandoc

Install pandoc on Mac OS X 10.8

Install

Install haskell-platform

$ brew install haskell-platform