Skip to content

Instantly share code, notes, and snippets.

View gearsandcode's full-sized avatar

Jesse Clark gearsandcode

  • Seattle, WA
View GitHub Profile
@mikenikles
mikenikles / config.yml
Last active November 23, 2021 16:52
A (mostly) automated release process
version: 2
# Re-usable blocks to reduce boilerplate
# in job definitions.
references:
container_config: &container_config
docker:
- image: my-company/circleci:gcloud # We use a custom Alpine Linux base image with the bare minimum
working_directory: /tmp/workspace
restore_repo: &restore_repo
@SMotaal
SMotaal / README.md
Last active March 17, 2018 13:36
Polymer 2 / TypeScript (using 2.0-preview branches)

Rational

The TypeScript 2.0-typescript branch seems to be lagging and isolated, with all components having 2.0-preview branches yet the 2.0-typescript README has not even been changed from the 2.0-preview text. Until a proper Polymer/TypeScript workflow is recommended and supported by the Polymer team, the basic idea is to maximize on the use of the essential features that TypeScript offers and not invest too much into hard-core features that require the workflow to be tightly coupled with late-bound transpilation of complex TypeScript projects (with modules / loaders). Another thing to address is how Hydrolysis fails to analyze and iron-component-page fails to document TypeScript-based components, not making good use of the elegant property declarations and decorators used in TypeScript. For now, a temporary workaround is needed to ensure that properties are defined and documented with proper types and default values, but the workaround needs to be easily replaceable once we have better Polymer/TypeScript

@msmfsd
msmfsd / es7-async-await.js
Last active February 4, 2024 17:38
Javascript fetch JSON with ES7 Async Await
// Async/Await requirements: Latest Chrome/FF browser or Babel: https://babeljs.io/docs/plugins/transform-async-to-generator/
// Fetch requirements: Latest Chrome/FF browser or Github fetch polyfill: https://github.com/github/fetch
// async function
async function fetchAsync () {
// await response of fetch call
let response = await fetch('https://api.github.com');
// only proceed once promise is resolved
let data = await response.json();
// only proceed once second promise is resolved
@NullVoxPopuli
NullVoxPopuli / angular-pls.md
Last active July 9, 2020 08:12
Anti Patterns (and things I don't like) in Angular2

General

Templates written a giant string in components.

This tutorial demonstrates this: https://angular.io/docs/ts/latest/tutorial/toh-pt1.html you don't get syntax coloring, or any benefits you'd get from a good html/templating tool.

(( flashbacks to inline html strings in C++ ))

Tag bloat with ngDirectives (such as ngFor)

from an angular.io example:

@eyecatchup
eyecatchup / material-design-breakpoints.css
Last active December 4, 2020 20:08
CSS media queries based on the breakpoint guidance published by the Material Design team. http://www.google.com/design/spec/layout/adaptive-ui.html#adaptive-ui-breakpoint
/* Material Design Adaptive Breakpoints */
/*
Below you'll find CSS media queries based on the breakpoint guidance
published by the Material Design team. You can choose to use, customise
or remove these breakpoints based on your needs.
http://www.google.com/design/spec/layout/adaptive-ui.html#adaptive-ui-breakpoints
*/
/* mobile-small */
@OlavHN
OlavHN / gist:ff73b104bb25e5e08a51
Last active June 28, 2017 19:27
React render to polymer components!
<!doctype html>
<html>
<head>
<!-- Web Component Polyfill for old browsers -->
<script src="https://www.polymer-project.org/platform.js"></script>
<!-- Release candidate of next React -->
<script src="http://fb.me/react-with-addons-0.12.0-rc1.js"></script>
<script src="http://fb.me/JSXTransformer-0.12.0-rc1.js"></script>
<!-- Import a web component -->
@pascalduez
pascalduez / SassMeister-input.scss
Last active December 20, 2023 20:38
Some Sass string functions: capitalize, ucwords, camelize, ...
// ----
// Sass (v3.3.4)
// Compass (v1.0.0.alpha.18)
// ----
// Capitalize string
// --------------------------------------------------------------------------------
// @param [string] $string
// --------------------------------------------------------------------------------
// @return [string]
@jlong
jlong / SassMeister-input.scss
Created February 1, 2014 22:53
Navigate a nested maps with map-fetch() in Sass
// ----
// Sass (v3.3.0.rc.2)
// Compass (v1.0.0.alpha.17)
// ----
//
// map-fetch($map, $keys)
//
// An easy way to fetch a deep value in a multi-level map. Works much like
// map-get() except that you pass multiple keys as the second parameter to
@erikreagan
erikreagan / mac-apps.md
Created August 4, 2012 19:18
Mac developer must-haves

Mac web developer apps

This gist's comment stream is a collection of webdev apps for OS X. Feel free to add links to apps you like, just make sure you add some context to what it does — either from the creator's website or your own thoughts.

— Erik