Skip to content

Instantly share code, notes, and snippets.

Avatar

Pablo rochapablo

View GitHub Profile
View _constants.scss
// http://css3.bradshawenterprises.com/blog/why-sass/
// _constants.scss
$brand-color: rgb(255,0,0);
$accent-color: darken($brand-color, 10); // That is, 10% darker than the brand-color.
$body-font: "Helvetica Neue", Arial, sans-serif;
$header-font: "Segoe UI", "Myriad Pro", $body-font;
$width: 960px;
View linq.jquery.js
// extension for jQuery
(function (root) {
if (root.Enumerable == null) {
throw new Error("can't find Enumerable. linq.jquery.js must load after linq.js");
}
if (root.jQuery == null) {
throw new Error("can't find jQuery. linq.jquery.js must load after jQuery");
}
@rochapablo
rochapablo / README.md
Last active Jun 14, 2018 — forked from azarus/gulptask.js
Gulp Task to transform Typescript path imports into relative paths using the tsconfig
View README.md

from this

import Head from '~components/Commons/Head';
require('~images/test.jpg')

to this

View settings.json
{
"editor.minimap.enabled": false,
"html.format.wrapLineLength": 0
}
@rochapablo
rochapablo / .html
Created Jul 26, 2018
Fixed Table with Bootstrap
View .html
<div class="container-fluid h-100 d-flex align-items-stretch bg-red">
<div class="row">
<div class="col-12 d-flex align-items-stretch bg-orange">
<div class="row">
<div class="col-3 bg-green">
<div class="row d-flex flex-column h-100">
<div class="col-12 bg-pink">filter</div>
<div class="col-12 bg-blue">
<table class="table">
<thead>
@rochapablo
rochapablo / .js
Created Jul 26, 2018
Promise Tuple
View .js
(function() {
console.clear()
const a = () => {
return Promise.resolve({ value: 'a' })
}
const b = () => {
return Promise.resolve({ value: 'b' })
}
@rochapablo
rochapablo / .js
Created Aug 8, 2018
Array of Object with Pagination
View .js
console.clear();
var data = [];
for (var i = 1; i <= 15; i++) {
var uuid = faker.random.uuid();
data.push({
id: i,
name: faker.name.findName(),
email: faker.internet.email(),
@rochapablo
rochapablo / .css
Last active Aug 8, 2018
angular-soundmanager2 (loop testing)
View .css
ul { margin: 0; padding: 0; }
ul li { list-style: none; margin-bottom: 8px; }
hr { border: 0; border-top: solid 1px #d9d9d9; }
@rochapablo
rochapablo / .js
Created Aug 8, 2018
ECMAScript 6 - Classes
View .js
class Movie {
constructor() {
this.title = '';
}
getTitle() {
return this.title;
}
setTitle(title) {
this.title = title;
}
@rochapablo
rochapablo / .js
Created Aug 8, 2018
Class to Object
View .js
console.clear();
var Track = function(attrs) {
this.icon = (attrs && attrs.icon || 'play_arrow');
this.toggle = (attrs && attrs.toggle || 'close');
this.arrow = (attrs && attrs.arrow || 'keyboard_arrow_down');
this.toObject = function() {
var newObject = {};
for (var prop in this) {
if (this.hasOwnProperty(prop) && typeof this[prop] !== 'function') {
You can’t perform that action at this time.