Skip to content

Instantly share code, notes, and snippets.

// 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;
// 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 June 14, 2018 07:50 — forked from azarus/gulptask.js
Gulp Task to transform Typescript path imports into relative paths using the tsconfig

from this

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

to this

{
"editor.minimap.enabled": false,
"html.format.wrapLineLength": 0
}
@rochapablo
rochapablo / .html
Created July 26, 2018 16:50
Fixed Table with Bootstrap
<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 July 26, 2018 17:09
Promise Tuple
(function() {
console.clear()
const a = () => {
return Promise.resolve({ value: 'a' })
}
const b = () => {
return Promise.resolve({ value: 'b' })
}
@rochapablo
rochapablo / .js
Created August 8, 2018 11:21
Array of Object with Pagination
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 August 8, 2018 11:23
angular-soundmanager2 (loop testing)
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 August 8, 2018 11:28
ECMAScript 6 - Classes
class Movie {
constructor() {
this.title = '';
}
getTitle() {
return this.title;
}
setTitle(title) {
this.title = title;
}
@rochapablo
rochapablo / .js
Created August 8, 2018 11:36
Class to Object
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') {