Skip to content

Instantly share code, notes, and snippets.

View ayozebarrera's full-sized avatar
⚛️
Reacting

Ayoze Barrera ayozebarrera

⚛️
Reacting
View GitHub Profile
@ayozebarrera
ayozebarrera / iron-router.coffee
Created August 10, 2014 11:30
Iron router cheatsheet
# A little Meteor CheatSheet about Iron-Router. (updated on a weekly basis)
# Check our Studio: https://gentlenode.com/
# Iron Router > Configuration
Router.configure
layoutTemplate: 'Main'
loadingTemplate: 'Loading'
@ayozebarrera
ayozebarrera / main.scss
Created August 18, 2014 10:01
Architecture for a Sass Project
// Sass utilities
@import "helpers/variables";
@import "helpers/functions";
@import "helpers/mixins";
@import "helpers/placeholders";
// Vendors and external stylesheets
@import "vendors/bootstrap";
@import "vendors/jquery-ui";
@ayozebarrera
ayozebarrera / shadow.css
Created August 20, 2014 08:34
Typical shadow on header element.
#shadow{
top: 0;
left: 0;
right: 0;
height: 6px;
box-shadow: inset 0px 5px 6px -3px rgba(0, 0, 0, 0.4);
position: static;
}
@ayozebarrera
ayozebarrera / ellipsis.scss
Created August 21, 2014 10:53
Text overflow ellipsis in multiples lines
$font-size: 20px;
$line-height: 1.4;
$lines-to-show: 22;
h2 {
display: block; /* Fallback for non-webkit */
display: -webkit-box;
max-width: 400px;
height: $font-size*$line-height*$lines-to-show; /* Fallback for non-webkit */
font-size: $font-size;
@ayozebarrera
ayozebarrera / diskpart.doc
Created August 25, 2014 08:55
How edit the disk with diskpart command
Method #1:
1. Boot up to installation DVD/CD.
2. Click install but don't follow through.
3. Press SHIFT-F10 to bring up console.
4. Type "diskpart"
5. Once inside diskpart type:
-> list disk (find the one you want to convert)
-> select disk 0 (select the one you want from the list)
-> convert mbr (should take a second or two)
@ayozebarrera
ayozebarrera / ios.doc
Created August 28, 2014 12:29
iOS dev info
Device Screen(res) CSS pixel ratio
iPad (generation 1,2) 1024 × 768 1
iPad (generation 3,4) 2048 × 1536 2
iPhone (gen 1,3G,3GS) 480 × 320 1
iPhone (gen 4,4S) 960 × 640 2
iPhone (gen 5) 1136 x 640 2
# ---------------------------------------------------------------------------
#
# Description: This file holds all my BASH configurations and aliases
#
# Sections:
# 1. Environment Configuration
# 2. Make Terminal Better (remapping defaults and adding functionality)
# 3. File and Folder Management
# 4. Searching
# 5. Process Management
$(document).mouseup(function (e)
{
var container = $("YOUR CONTAINER SELECTOR");
if (!container.is(e.target) // if the target of the click isn't the container...
&& container.has(e.target).length === 0) // ... nor a descendant of the container
{
container.hide();
}
});
@ayozebarrera
ayozebarrera / ignore.js
Created September 18, 2014 15:33
Ignore an element inside an element
$.fn.ignore = function(sel){
return this.clone().find(sel).remove().end();
};
//<div id="test"><b>Hello</b>!!!<span>w00t!!</span>
//var text = $('#test').ignore("span").text(); "Hello!!!"
//var html = $('#test').ignore("span").html(); "<b>Hello</b>!!!"

Keybase proof

I hereby claim:

  • I am ayozebarrera on github.
  • I am ayozebarrera (https://keybase.io/ayozebarrera) on keybase.
  • I have a public key whose fingerprint is ED12 E6C4 2536 67D4 E562 1B82 A0DF CDC0 2760 E5B3

To claim this, I am signing this object: