Skip to content

Instantly share code, notes, and snippets.

View djadriano's full-sized avatar
:octocat:
Coding...

Adriano Kikuchi Fernandes djadriano

:octocat:
Coding...
View GitHub Profile
@djadriano
djadriano / gist:097e3ddf5e457cb7e155fcdc58ade26d
Created April 27, 2016 18:51
Insert large json in mongodb
mongoimport -d my_db -c my_collection < my_json_file.json --batchSize 1
@djadriano
djadriano / mongostart
Created March 7, 2016 23:08
mongo start
alias mongostart="mongod --dbpath Documents/Databases"
@djadriano
djadriano / vw.scss
Created February 22, 2016 19:44
VW Mixin
@mixin vw-type($properties, $min-vw, $max-vw, $min-value, $max-value) {
& {
@each $property in $properties {
// #{$property}: $min-value;
}
@media screen and (min-width: $min-vw) {
@each $property in $properties {
#{$property}: calc(#{$min-value} + #{strip-unit($max-value - $min-value)} * ((100vw - #{$min-vw}) / #{strip-unit($max-vw - $min-vw)}));
}
@djadriano
djadriano / vw.scss
Last active October 19, 2015 19:47
VW Mixins
/*
How to Use:
@include vw((padding-top, padding-bottom), 40px);
If needs rewrite some property, use:
@include vw((padding-top, padding-bottom), 40px, $min-vw: mq('laptop'));
*/
@mixin vw($property, $min-value, $max-value: $min-value, $min-vw: mq('mobile'), $max-vw: mq('tv')) {
@djadriano
djadriano / remove locked
Created July 9, 2015 01:30
Remove locked of files
chflags -R nouchg directory
@djadriano
djadriano / teste
Created March 3, 2015 01:07
teste
<div id="nk-flyknit-running-box">
<div class="nk-flyknit-running-box-title">
<h2 class="nk-TradeGothic nk-fs36 nk-color-000">Melhore<br>sua corrida</h2>
</div>
<div class="nk-flyknit-running-box-images">
<div class="nk-flyknit-running-box-items">
<figure class="nk-flyknit-running-box-items-image">
<%= image_tag 'dri_fir_feminino.jpg' %>
<figcaption class="nk-flyknit-running-box-items-image-desc">
<h3 class="nk-TradeGothic nk-color-000">Dri-fir Knit Feminino</h3>
@djadriano
djadriano / gist:887687a9d3e4e21a7639
Created January 19, 2015 21:33
Form with Flexbox
.flex { display: flex; }
.v-center {
justify-content: center;
align-items: center;
}
.wrap { flex-wrap: wrap; }
.form-fields {
@djadriano
djadriano / create rvmrc
Created October 28, 2014 20:00
create .rvmrc by rvm
rvm --create --ruby-version use ruby-2.0.0-p247@mycoolapp
@djadriano
djadriano / basic_template_for_emails
Created October 23, 2014 18:28
basic template for emails
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no">
</head>
<body>
<!--your content here -->
</body>
</html>
@djadriano
djadriano / reset_css_responsive_mails
Last active August 29, 2015 14:08
reset css for responsive mails
/* Force Hotmail to display emails at full width */
.ReadMsgBody {
width: 100%;
}
.ExternalClass {
width: 100%;
}
/* Forces Hotmail to display normal line spacing. */
.ExternalClass,