Skip to content

Instantly share code, notes, and snippets.

View stramel's full-sized avatar

Michael Stramel stramel

View GitHub Profile
@stramel
stramel / 192.168.33.10.xip.io-error.log
Created March 4, 2014 20:56
Running `vagrant up` to install php, apache, mysql, composer, and laravel using Vaprobash Vagrantfile.
[Tue Mar 04 20:32:56.275827 2014] [ssl:warn] [pid 10952:tid 140190021068608] AH01909: RSA certificate configured for 192.168.33.10.xip.io:443 does NOT include an ID which matches the server name
[Tue Mar 04 20:32:58.155500 2014] [ssl:warn] [pid 11202:tid 139739659188032] AH01909: RSA certificate configured for 192.168.33.10.xip.io:443 does NOT include an ID which matches the server name
[Tue Mar 04 20:32:58.231900 2014] [ssl:warn] [pid 11203:tid 139739659188032] AH01909: RSA certificate configured for 192.168.33.10.xip.io:443 does NOT include an ID which matches the server name
[Tue Mar 04 20:48:59.062314 2014] [fastcgi:error] [pid 14607:tid 139739552024320] [client 192.168.33.1:59866] FastCGI: comm with server "/usr/lib/cgi-bin/php5-fcgi" aborted: idle timeout (30 sec)
[Tue Mar 04 20:48:59.062945 2014] [fastcgi:error] [pid 14607:tid 139739552024320] [client 192.168.33.1:59866] FastCGI: incomplete headers (0 bytes) received from server "/usr/lib/cgi-bin/php5-fcgi"
@stramel
stramel / repoChanges.sh
Last active August 29, 2015 14:21
Provides additions, removals, and total lines for given user of a git repository.
# More information at https://github.com/jakeleboeuf/contributor/issues/8
git log --author="Michael Stramel|mstramel|stramel" --perl-regexp --all --pretty=tformat: --numstat | \
grep -v docs | \
gawk '{ add += $1 ; subs += $2 ; loc += $1 - $2 } END \
{ printf "added lines: %s removed lines : %s total lines: %s\n",add,subs,loc }' -
@stramel
stramel / STYLES.md
Last active March 29, 2016 13:52
Collection of various articles

CSS Style Suggestions

PX, EM, REM

  • Use em for media queries Read More
  • When to use rem vs em? Read More
    • Size in em if the property scales according to it's font-size
  • Size everything else in rem
@stramel
stramel / css-var-polyfill.js
Created September 6, 2016 21:48
CSS Variable Polyfill
/*
TODO:
X Maybe account for defaults: color: var(--header-color, blue);
- Verify cross domain working or not (it is working from dropbox)
- Option to wait to apply anything until all <link>s are parsed or inject what we have and update as each <link> returns
- Need to test on a more complex CSS file
- Option to save parsed file in local/session storage so there isn't a delay on additional page loads. Could only do it for links (with URLs to use as keys) and style blocks with IDs of some sort
- Need to test more complex values like rgba(255,0,0,0.5); and something with !important
- Try multiple links
- Local links
@stramel
stramel / keymap.cson
Created December 20, 2016 20:10
Atom Keybindings
'body':
'ctrl-shift-s': 'window:save-all'
'.workspace .editor':
'ctrl-d': 'editor:duplicate-lines'
'ctrl-shift-D': 'editor:delete-line'
'.editor':
'alt-shift-right': 'editor:select-to-end-of-line'
'alt-right': 'editor:move-to-end-of-line'
@stramel
stramel / index.html
Created February 22, 2017 17:00
PSK Fix for Polymer Undefined
<!--
@license
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
The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
Code distributed by Google as part of the polymer project is also
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
-->
<!doctype html>
<head>
<base href="https://polygit.org/polymer+:2.0-preview/webcomponentsjs+webcomponents+:v1/custom-elements+webcomponents+*/shadydom+webcomponents+*/shadycss+webcomponents+*/components/">
<script src="webcomponentsjs/webcomponents-loader.js"></script>
<link href="polymer/polymer-element.html" rel="import">
</head>
<body>
<script id="jsbin-source-html" type="text/html"><!doctype html>
@stramel
stramel / .eslintrc.js
Last active June 13, 2017 15:16
Linter files
module.exports = {
'extends': ['eslint:recommended', 'google'],
'env': {
browser: true,
es6: true
},
'globals': {
Polymer: true
},
'rules': {
@stramel
stramel / reflection.js
Created June 21, 2017 02:50
A couple options
Polymer.__importLazyGroup = function(
callingElement, group, fromElement, options) {
if (!fromElement) {
fromElement = Polymer.DomModule.import(callingElement.localName);
}
var importStatuses = {loaded: [], failed: []};
var groupAttribute = group ? '[group=' + group + ']' : ':not([group])';
var query =
'link' +groupAttribute+ '[rel=\'lazy-import\'][href]:not([href=\'\'])';
@stramel
stramel / browserlist
Created August 16, 2017 20:20
Polymer Gulp multiple builds
last 3 versions
not Explorer < 11
not ExplorerMobile < 11