Skip to content

Instantly share code, notes, and snippets.

View drwpow's full-sized avatar
🤘

Drew Powers drwpow

🤘
View GitHub Profile
  • 200 OKs
  • Dat SaaS
  • Dirty Bits
  • Magneto
  • Object Object
  • Sex Pixels
  • Strange Loop
# @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?
@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() {
@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 / ui-paradigms.md
Last active July 31, 2017 00:21
UI Paradigms:
@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 / 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 / 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 / will-i-am.md
Created February 22, 2018 16:12
Will.I.Am, on Design & Success

will.i.am, on brand

First off, your logo has to be just as impactful in black-and-white. You have to start there. If your logo is not powerful, black-and-white, then there’s a problem.

If your logo isn’t powerful very very small, then there’s a problem.

If your logo collapses when you blow it up really, really big, then there’s a problem.

If your logo can’t transform itself to other things, and you still know what that logo is, then there’s a problem.

So your logo should be able to have all those things in the new world, where, you know, it’s symbolic—it has some type of, uh, meaning that represents your brand’s and company’s—I don’t even like to use the term “brand”—if the logo doesn’t represent the company’s objective on a symbolic level, right? Because you have to think of what India is going to do to the world. We know what Silicon Valley did to the world. We know what China does for the world. But what India is going to do for the world is they’re going to create this symbolic language. Because Ind