Skip to content

Instantly share code, notes, and snippets.

Thieu Nguyen thieunv90

Block or report user

Report or block thieunv90

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
@thieunv90
thieunv90 / Replace_Method_with_Method_Object.rb
Last active Dec 9, 2019
Tech Debt: Meta-programming & Refactoring
View Replace_Method_with_Method_Object.rb
# 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 Mar 27, 2018 — forked from adham90/spacemacs-keybindings
spacemacs keybindings that i need to learn
View spacemacs-keybindings
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 Mar 14, 2018 — forked from Eomerx/sass-space.scss
SASS Space - Responsive CSS Positining Classes built with SASS
View sass-space.scss
// 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 Mar 14, 2018 — forked from Eomerx/less-space.less
Less Space - Responsive CSS Positioning Classes
View less-space.less
//====================================
// FOR LOOP =
//====================================
.for(@i, @n) {
.-each(@i)
}
.for(@n) when (isnumber(@n)) {
.for(1, @n)
}
@thieunv90
thieunv90 / 1. main.css
Created Mar 14, 2018 — forked from EmranAhmed/1. main.css
CSS Responsive breakpoint, Media Query break point
View 1. main.css
/*==================================================
= Bootstrap 3 Media Queries =
==================================================*/
/*========== Mobile First Method ==========*/
/* Custom, iPhone Retina */
@media only screen and (min-width : 320px) {
}
@thieunv90
thieunv90 / index.css
Created Mar 14, 2018 — forked from carlossalas/index.css
CSS: Margins and Paddings classes
View index.css
.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 Dec 15, 2017 — forked from bantic/bucket_sync_service.rb
ruby class to copy from one aws s3 bucket to another
View bucket_sync_service.rb
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 Nov 7, 2017
imagemagick on macOS 10.12.6 - Homebrew build logs
View # imagemagick - 2017-11-07_15-12-45.txt
Homebrew build logs for imagemagick on macOS 10.12.6
Build date: 2017-11-07 15:12:45
You can’t perform that action at this time.