Skip to content

Instantly share code, notes, and snippets.

View thieunv90's full-sized avatar

Thieu Nguyen thieunv90

View GitHub Profile
@thieunv90
thieunv90 / readline_bundle_image_not_found.md
Created July 15, 2020 16:39 — forked from zulhfreelancer/readline_bundle_image_not_found.md
How to fix 'readline.bundle image not found' problem?

If you get error like this:

Running via Spring preloader in process 7662
/Users/zulh/.rvm/gems/ruby-2.3.1@useradmin/gems/activesupport-4.2.6/lib/active_support/dependencies.rb:274:in `require': dlopen(/Users/zulh/.rvm/rubies/ruby-2.3.1/lib/ruby/2.3.0/x86_64-darwin15/readline.bundle, 9): Library not loaded: /usr/local/opt/readline/lib/libreadline.6.dylib (LoadError)
  Referenced from: /Users/zulh/.rvm/rubies/ruby-2.3.1/lib/ruby/2.3.0/x86_64-darwin15/readline.bundle
  Reason: image not found - /Users/zulh/.rvm/rubies/ruby-2.3.1/lib/ruby/2.3.0/x86_64-darwin15/readline.bundle
	from /Users/zulh/.rvm/gems/ruby-2.3.1@useradmin/gems/activesupport-4.2.6/lib/active_support/dependencies.rb:274:in `block in require'
	from /Users/zulh/.rvm/gems/ruby-2.3.1@useradmin/gems/activesupport-4.2.6/lib/active_support/dependencies.rb:240:in `load_dependency'
	from /Users/zulh/.rvm/gems/ruby-2.3.1@useradmin/gems/activesupport-4.2.6/lib/active_support/dependencies.rb:274:in `require'
@thieunv90
thieunv90 / Replace_Method_with_Method_Object.rb
Last active December 9, 2019 07:26
Tech Debt: Meta-programming & Refactoring
# Before
require 'socket'
class MailSender
def initialize
@sent_messages = []
end
def send_message(msg, recipient = "rubyguides.com")
raise ArgumentError, "message too small" if msg.size < 5
@thieunv90
thieunv90 / spacemacs-keybindings
Created March 27, 2018 08:29 — forked from adham90/spacemacs-keybindings
spacemacs keybindings that i need to learn
SPC s c remove highlight
**** Files manipulations key bindings
Files manipulation commands (start with ~f~):
| Key Binding | Description |
|-------------+----------------------------------------------------------------|
| ~SPC f c~ | copy current file to a different location |
| ~SPC f C d~ | convert file from unix to dos encoding |
| ~SPC f C u~ | convert file from dos to unix encoding |
@thieunv90
thieunv90 / sass-space.scss
Created March 14, 2018 11:44 — forked from Eomerx/sass-space.scss
SASS Space - Responsive CSS Positining Classes built with SASS
// change to false if its not imported into bootstrap
$use-bootstrap: false;
// margin and padding values array
$space-values : (
5,
10,
15,
20,
30,
@thieunv90
thieunv90 / less-space.less
Created March 14, 2018 11:42 — forked from Eomerx/less-space.less
Less Space - Responsive CSS Positioning Classes
//====================================
// FOR LOOP =
//====================================
.for(@i, @n) {
.-each(@i)
}
.for(@n) when (isnumber(@n)) {
.for(1, @n)
}
@thieunv90
thieunv90 / 1. main.css
Created March 14, 2018 02:40 — forked from EmranAhmed/1. main.css
CSS Responsive breakpoint, Media Query break point
/*==================================================
= Bootstrap 3 Media Queries =
==================================================*/
/*========== Mobile First Method ==========*/
/* Custom, iPhone Retina */
@media only screen and (min-width : 320px) {
}
@thieunv90
thieunv90 / index.css
Created March 14, 2018 02:21 — forked from carlossalas/index.css
CSS: Margins and Paddings classes
.m-l{margin-left: 15px}
.m-l-none{margin-left: 0}
.m-l-mini{margin-left: 5px;}
.m-l-small{margin-left: 10px;}
.m-l-large{margin-left: 20px;}
.m-l-n{margin-left: -15px}
.m-l-n-mini{margin-left: -5px}
.m-l-n-small{margin-left: -10px}
.m-l-n-large{margin-left: -20px}
@thieunv90
thieunv90 / bucket_sync_service.rb
Created December 15, 2017 08:18 — forked from bantic/bucket_sync_service.rb
ruby class to copy from one aws s3 bucket to another
require 'aws/s3' # gem name is 'aws-sdk'
class BucketSyncService
attr_reader :from_bucket, :to_bucket, :logger
attr_accessor :debug
DEFAULT_ACL = :public_read
# from_credentials and to_credentials are both hashes with these keys:
# * :aws_access_key_id
@thieunv90
thieunv90 / # imagemagick - 2017-11-07_15-12-45.txt
Created November 7, 2017 07:03
imagemagick on macOS 10.12.6 - Homebrew build logs
Homebrew build logs for imagemagick on macOS 10.12.6
Build date: 2017-11-07 15:12:45