Skip to content

Instantly share code, notes, and snippets.

View drwpow's full-sized avatar
🤘

Drew Powers drwpow

🤘
View GitHub Profile
@drwpow
drwpow / webpack-separate-environments-readme.md
Last active December 4, 2017 00:06
Separate Production/Development webpack Setups

Setup

yarn add webpack webpack-merge

File structure

Can be changed, but affects context and resolve.modules in webpack.common.js:

├── config
@drwpow
drwpow / browse.js
Created August 27, 2017 16:07
Browse Google Chrome Image Cache
/**
* Browse Google Chome Image Cache
* Navigate to chrome://cache/, then paste this into Console tab to browse images as a long feed
*/
// 1. Filter out domains (optional; uncomment to enable)
// This shows how to only allow images from `twimg.com`
//
// var nonLinks = document.querySelectorAll('a')
// nonLinks.forEach(link => link.innerText.indexOf('twimg.com') !== -1 ? undefined : link.remove());
@drwpow
drwpow / webvr-resources.md
Last active August 28, 2017 14:58
WebVR Resources

Tools / Resources

  • A-Frame: build WebVR experiences with HTML + JS
  • AR.js: build AR experiences with HTML + JS
  • Blender: powerful, open-source 3D modeling
  • Clara.io: 3D modeling in browser
  • Hologram: codeless VR experience builder
  • ReactVR: build WebVR using React + React Native
  • TurboSquid: free 3D models for most renderers

Demos

@drwpow
drwpow / ui-paradigms.md
Last active July 31, 2017 00:21
UI Paradigms:
@drwpow
drwpow / what-i-learned.md
Last active August 18, 2017 03:05
What I learned in 2017

Week 28: July 9 – 15

@drwpow
drwpow / component.js
Last active June 26, 2017 16:33
RxJS in Vue.js
import { Observable } from 'rxjs/Observable';
import 'rxjs/add/observable/fromEvent';
import 'rxjs/add/operator/throttleTime';
import 'rxjs/add/operator/debounceTime';
export default {
data() {
resize$: {},
},
created() {
# @contact = User contact information
# @project = Entire order, with budget, including multiple pieces
# Company Name if present; otherwise First Name + Last Name
company_name = @contact.company.present? ? @contact.company : "#{@contact.first_name} #{@contact.last_name}"
# 1. Create Account if not exists
account_id = salesforce.query("select Id from Account where Name = '#{j(company_name)}'")&.first&.Id
# 1a. Update if match
if account_id.present?
  • 200 OKs
  • Dat SaaS
  • Dirty Bits
  • Magneto
  • Object Object
  • Sex Pixels
  • Strange Loop

SVG Icons

SVGs are the future. SVG icon manifests are now widely-supported by all major browsers, but svg4everybody is still available as a polyfill if needed.

Manifest

The SVG Manifest looks something like this (we’ll call this icons.svg):

<svg xmlns="http://www.w3.org/2000/svg">