Skip to content

Instantly share code, notes, and snippets.

Carlos Araya caraya

Block or report user

Report or block caraya

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
caraya / webstoemp-gulpfile.js
Created Jan 24, 2020 — forked from jeromecoupe/webstoemp-gulpfile.js
Gulp 4 sample gulpfile.js. For a full explanation, have a look at
View webstoemp-gulpfile.js
"use strict";
// Load plugins
const autoprefixer = require("autoprefixer");
const browsersync = require("browser-sync").create();
const cp = require("child_process");
const cssnano = require("cssnano");
const del = require("del");
const eslint = require("gulp-eslint");
const gulp = require("gulp");
caraya / scripts-to-footer-exclude-amp.php
Created Dec 4, 2019 — forked from westonruter/scripts-to-footer-exclude-amp.php
Exclude all AMP scripts from being moved to the footer by the Scripts To Footer plugin. All AMP scripts have async anyway so they do not need to be moved to the footer for performance.
View scripts-to-footer-exclude-amp.php
caraya / displacement.html
Created Mar 25, 2019 — forked from akella/displacement.html
svg displacement animation
View displacement.html
<filter id="displacement" filterUnits="objectBoundingBox">
<feTurbulence type="turbulence" baseFrequency="0.01" numOctaves="2" result="turb"/>
<feColorMatrix in="turb" result="huedturb" type="hueRotate" values="90">
<animate attributeType="XML" attributeName="values" values="0;180;360" dur="6s" repeatCount="indefinite"/>
<feDisplacementMap in="SourceGraphic" in2="huedturb" scale="20" result="displace" xChannelSelector="B"/>
<feOffset dx="-5" dy="-5" in="displace" result="unoffsetdisplace"/>
caraya / lazy-video-loader.js
Created Mar 5, 2019 — forked from benrobertsonio/lazy-video-loader.js
Lazy Loading Video Based on Connection Speed
View lazy-video-loader.js
class LazyVideoLoader {
constructor() {
this.videos = []'.hero__bgvideo'));
// Abort when:
// - The browser does not support Promises.
// - There no videos.
// - If the user prefers reduced motion.
// - Device is mobile.
if (
caraya /
Created Feb 24, 2019 — forked from CodingDoug/
Realtime Database triggers with Cloud Functions for Firebase - source

Realtime Database triggers with Cloud Functions for Firebase - source

This gist contains the source code in my video series about Realtime Database triggers. You can watch the three parts here:

  1. Part 1 (intro, onCreate)
  2. Part 2 (onUpdate, infinite loops)
  3. Part 3 (onDelete, transactions)

index.ts contains the Cloud Functions code, and dialog.ts contains the script to run

caraya / lettering.html
Created Nov 1, 2018 — forked from adactio/lettering.html
A quick'n'dirty way of doing some lettering.js stuff without jQuery.
View lettering.html
<!DOCTYPE html>
<html lang="en">
.slogan span:nth-child(odd) {
color: red;
caraya / package.json
Created Apr 19, 2018 — forked from surma/package.json
Boilerplate for quick one-off TypeScript projects. Just run `npm start`
View package.json
"name": "tsquickstart",
"version": "1.0.0",
"description": "Boilerplate for quick one-off TypeScript projects. Just run `npm start`",
"scripts": {
"init": "test -f tsconfig.json || (tsc --init -t ESNext -m ESNext && npm install)",
"start": "npm run init && concurrently \"npm run watch\" \"npm run serve\"",
"serve": "http-server",
"watch": "tsc -p . --watch",
"build": "tsc -p ."

Principles of Adult Behavior

  1. Be patient. No matter what.
  2. Don’t badmouth: Assign responsibility, not blame. Say nothing of another you wouldn’t say to him.
  3. Never assume the motives of others are, to them, less noble than yours are to you.
  4. Expand your sense of the possible.
  5. Don’t trouble yourself with matters you truly cannot change.
  6. Expect no more of anyone than you can deliver yourself.
  7. Tolerate ambiguity.
  8. Laugh at yourself frequently.
caraya / drive-appscript.js
Created Oct 16, 2017 — forked from igrigorik/drive-appscript.js
Sample BigQuery queries for the HTTP Archive dataset.
View drive-appscript.js
function onOpen() {
var ss = SpreadsheetApp.getActiveSpreadsheet();
var menuEntries = [ {name: "Run Query", functionName: "runQuery"} ];
ss.addMenu("HTTP Archive + BigQuery", menuEntries);
function runQuery() {
var projectNumber = 'httparchive';
var sheet = SpreadsheetApp.getActiveSheet();
caraya / fancy-tabs-demo.html
Created Oct 25, 2016 — forked from ebidel/fancy-tabs-demo.html
Fancy tabs web component - shadow dom v1, custom elements v1, full a11y
View fancy-tabs-demo.html
function execPolyfill() {
// CustomElementsV1.min.js v1 polyfill from
Copyright (c) 2016 The Polymer Project Authors. All rights reserved.
This code may only be used under the BSD style license found at
The complete set of authors may be found at
You can’t perform that action at this time.