Skip to content

Instantly share code, notes, and snippets.

@jameswquinn
jameswquinn / index.html
Created February 2, 2017 21:45 — forked from anonymous/index.html
tngHy
<div class="my-container">
<div class="my-element"></div>
<div class="my-element"></div>
<div class="my-element"></div>
</div>
@jameswquinn
jameswquinn / index.html
Created February 19, 2017 17:42 — forked from anonymous/index.html
Sass parallax example
<div class="container">
<h1>Parallax</h1>
<h2>faster</h2>
<h2>easier</h2>
<h2>sassier</h2>
<img src="http://placekitten.com/200/200" alt=" " />
<img src="http://placekitten.com/150/200" alt=" " />
<img src="http://placekitten.com/200/150" alt=" " />
<img src="http://placekitten.com/150/250" alt=" " />
<img src="http://placekitten.com/300/400" alt=" " />
$(document).ready(function(){
//setup info
var id = "";//<- You user id
var num = 1;//<- How many images to pull in
// Grab JSON from Flickr
$.getJSON("http://api.flickr.com/services/feeds/groups_pool.gne?id="+id+"&lang=en-us&format=json&jsoncallback=?", displayImages);
//
function displayImages(data)
@jameswquinn
jameswquinn / webpack.config.js
Created September 3, 2017 18:48 — forked from lgraubner/webpack.config.js
Webpack image processing sample configuration
const webpackConfig = {
entry: './app/index.js',
output: {
filename: 'bundle.js',
path: path.resolve(__dirname, 'dist')
},
module: {
rules: [
{
test: /\.css$/,
@jameswquinn
jameswquinn / .babelrc
Created September 25, 2017 08:26 — forked from JamieMason/.babelrc
Tree-Shaking with Babel 6, Webpack 2, and React.
{
"presets": [
["es2015", {
"es2015": {
"loose": true,
"modules": false
}
}], "react"
]
}
@jameswquinn
jameswquinn / README.md
Created October 15, 2017 09:57
A simple Webpack (with Dev Server) + Gulp Configuration + LiveReload + Babel to playground where you can code ES6 without the need for React

A simple Webpack + Gulpfile configuration wihtout any need for React.js that assumes you have the following project structure:

node_modules/ bower_components/ scripts/

Entry script is in scripts/entry.js

You should run gulp && gulp build-dev and you are good to go.

@jameswquinn
jameswquinn / meta-tags.md
Created October 15, 2017 12:10 — forked from whitingx/meta-tags.md
Complete List of HTML Meta Tags

Copied from http://code.lancepollard.com/complete-list-of-html-meta-tags/

Basic HTML Meta Tags

<meta charset='UTF-8'>
<meta name='keywords' content='your, tags'>
<meta name='description' content='150 words'>
<meta name='subject' content='your website's subject'>
<meta name='copyright' content='company name'>
@jameswquinn
jameswquinn / gulp-pdf-snippet.js
Created January 4, 2018 22:03
gulp recipe for html to pdf including icon font and images in base 64
var pdf = require('gulp-html-pdf');
var replace = require('gulp-replace');
var inlineimg = require('gulp-inline-image-html');
var cssfont64 = require('gulp-cssfont64');
gulp.task('pdf',['font64'], function () {
return gulp.src('HTML/Pages/*.html')
.pipe(replace(/<link\b.+href="(?!http)([^"]*)".*>/g, function(s, filename) {
var filepath = path.relative(__dirname , path.resolve(__dirname + '/HTML/css', filename))
var style = fs.readFileSync(filepath, 'utf8');
@jameswquinn
jameswquinn / ripple.js
Created February 4, 2018 16:36 — forked from MattHsiung/ripple.js
Ripple Button
/**
* Created by matt on 3/8/17.
*/
import React, { PropTypes } from 'react';
import './button.scss';
function ripple (e) {
const midX = e.offsetX;
const midY = e.offsetY;
const { width, height } = e.target.getBoundingClientRect();
h1 {
font-weight: 300;
font-size: 1.8em;
margin-top: 0;
}
a {
color: #fff;
}
.draggable-header-view {
background-color: #fff;