Skip to content

Instantly share code, notes, and snippets.

View Mario-Duarte's full-sized avatar
:shipit:
Starting a new position

Mario Duarte Mario-Duarte

:shipit:
Starting a new position
View GitHub Profile
@Mario-Duarte
Mario-Duarte / custom_wp_gallery
Last active October 6, 2016 12:31 — forked from carlesjove/custom_wp_gallery
Custom gallery markup for WordPress. Put this un functions.php and it will override the default shortcode. [Edited version from original]
@Mario-Duarte
Mario-Duarte / index.html
Created September 15, 2016 13:30
Minimalist Mobile Mockup
<div class="wrapper">
<div class="phone">
<div class="camera"></div>
<div class="speaker"></div>
<div class="screen">
<div class="inner">
<!-- your mobile layout here -->
</div>
</div>
@Mario-Duarte
Mario-Duarte / _keep-ratio-mixin.scss
Created July 5, 2016 10:13
A sass mixin to keep aspect ratios
@mixin aspect-ratio($percentual-height){
// Wrapper
position: relative;
display: inline-block;
vertical-align: top;
&:before {
padding-top:$percentual-height;
content: '';
display: block;
}
@Mario-Duarte
Mario-Duarte / _variables.scss
Created July 5, 2016 10:07
Quick Start Variables file for scss projects
//B&W Variables
$black: #000000;
$asphalt: #212121;
$choal: #333333;
$charcoal: #555555;
$grey: #999999;
$lightGrey: #dddddd;
$vapor: #eeeeee;
$clouds: #f8f8f8;
$white: #ffffff;
@Mario-Duarte
Mario-Duarte / data_to_json.php
Created July 5, 2016 09:52
Save Data to a json file
if (!isset($_POST['data']) && !empty($_POST['data'])) {
$data = $_POST['data'];
$jsonObject = json_encode($data);
file_put_contents('data.json', $jsonObject);
}
@Mario-Duarte
Mario-Duarte / index.html
Created May 11, 2016 09:15
Html Banner Template for DCM with clicktag
<!doctype html>
<html lang="en">
<head>
<meta charset ="utf-8">
<title>Name - banner size</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no" />
<meta name="ad.size" content="height=0,width=0">
<script src="http://code.jquery.com/jquery-1.9.1.js"></script>
@Mario-Duarte
Mario-Duarte / app.scss
Created January 5, 2015 12:24
Fix to foundation off-canvas background fixed in chrome
//This will fix the bug without losing the paralax effect
//turn the webkit backface visible
//NOTE: do not use any force gpu render on the html or body, this will make the background still glitching
html, body, main{
-webkit-backface-visibility: visible;
height: 100%;
min-height: 100%;
}