Skip to content

Instantly share code, notes, and snippets.

@caraya
caraya / drive-appscript.js
Created October 16, 2017 20:03 — forked from igrigorik/drive-appscript.js
Sample BigQuery queries for the HTTP Archive dataset.
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
caraya / fancy-tabs-demo.html
Created October 25, 2016 12:51 — forked from ebidel/fancy-tabs-demo.html
Fancy tabs web component - shadow dom v1, custom elements v1, full a11y
<script>
function execPolyfill() {
(function(){
// CustomElementsV1.min.js v1 polyfill from https://github.com/webcomponents/webcomponentsjs/tree/v1/src/CustomElements/v1.
/*
Copyright (c) 2016 The Polymer Project Authors. All rights reserved.
This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
brew install caskroom/cask/brew-cask
brew cask install google-chrome
ln -sf ~/Applications/Google\ Chrome.app /Applications
brew cask install megasync
ln -s '/opt/homebrew-cask/Caskroom/megasync/latest/MEGAsync.app' '/Applications/MEGAsync.app'
brew cask install dropbox
brew cask install google-drive
brew cask install iterm2
brew cask install spectacle
@caraya
caraya / gulpfile.babel.js
Created August 3, 2016 04:09 — forked from timothyis/gulpfile.babel.js
Gulp 4, ES6 gulpfile example
// Gulp module imports
import {src, dest, watch, parallel, series} from 'gulp';
import del from 'del';
import livereload from 'gulp-livereload';
import sass from 'gulp-sass';
import minifycss from 'gulp-minify-css';
import jade from 'gulp-jade';
import gulpif from 'gulp-if';
import babel from 'gulp-babel';
import yargs from 'yargs';
@caraya
caraya / dns-prefetch.php
Created July 21, 2016 03:45 — forked from leogopal/dns-prefetch.php
DNS Prefetching in WordPress
<?php
// Prefetch For Speed Up
function dns_prefetch() {
$prefetch = 'on';
echo "\n <!-- DNS Prefetching Start --> \n";
echo '<meta http-equiv="x-dns-prefetch-control" content="'.$prefetch.'">'."\n";
if ($prefetch != 'on') {
@caraya
caraya / base.css
Last active August 31, 2015 21:59 — forked from planetoftheweb/base.css
Base CSS document with google fonts, Eric Meyer's reset.css, Ethan Schoonover's solarized palette and some basic responsive code.
@import url(http://fonts.googleapis.com/css?family=Roboto+Slab:700|Exo+2:300,600);
/* Eric Meyer's Reset CSS v2.0 - http://cssreset.com */
html,body,div,span,applet,object,iframe,h1,h2,h3,h4,h5,h6,p,blockquote,pre,a,abbr,acronym,address,big,cite,code,del,dfn,em,img,ins,kbd,q,s,samp,small,strike,strong,sub,sup,tt,var,b,u,i,center,dl,dt,dd,ol,ul,li,fieldset,form,label,legend,table,caption,tbody,tfoot,thead,tr,th,td,article,aside,canvas,details,embed,figure,figcaption,footer,header,hgroup,menu,nav,output,ruby,section,summary,time,mark,audio,video{border:0;font-size:100%;font:inherit;vertical-align:baseline;margin:0;padding:0}article,aside,details,figcaption,figure,footer,header,hgroup,menu,nav,section{display:block}body{line-height:1}ol,ul{list-style:none}blockquote,q{quotes:none}blockquote:before,blockquote:after,q:before,q:after{content:none}table{border-collapse:collapse;border-spacing:0}
/* Solarized Palette - http://ethanschoonover.com/solarized ---------
lightgray : #819090;
gray : #70
<html>
<head>
<meta charset='utf-8'>
<style type='text/css'>
/*
We can leave the figcaption without doing anything to its width :)
*/
p.caption {
font-family: "ArnoPro-Caption";
font-size: .6em;
@caraya
caraya / _media32.scss
Last active August 29, 2015 14:27
A Sass 3.2 mixin for dealing with Media Queries
// Here are some variables, then a mixin and then an application of the mixin - this will only compile using Sass 3.2
//variables
$XS: 12.5em; // 200px;
$S: 18.75em; // 300px
$SM: 35em; // 560px
$M: 47.5em; // 760px
$L: 63em; // 1008px
$XL: 110em; // 1760px
$XXL: 180em; // 2880px
@caraya
caraya / A article post with summary
Last active August 29, 2015 14:26 — forked from yulijia/A article post with summary
[Jekyll] How to create post summary in Freshman21 theme
---
published: true
title: how to create post summary
layout: post
summary: This post show us how to create a post summary step by step.
author: Yu
category: howto
tags:
- summary
---
@caraya
caraya / gulpfile.js
Last active August 29, 2015 14:19 — forked from Raynos/gulpfile.js
/*
This is an EXAMPLE gulpfile.js
You'll want to change it to match your project.
Find plugins at https://npmjs.org/browse/keyword/gulpplugin
*/
var gulp = require('gulp');
var uglify = require('gulp-uglify');
gulp.task('scripts', function() {
// Minify and copy all JavaScript (except vendor scripts)