This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Updates your git remote named `origin` with a new password if you're authenticating | |
# using basic auth (and not SSH). E.g. if you work for a corporatin with a proxy that | |
# murders your attempt to connect over SSH. | |
# | |
# How to use: | |
# | |
# 1. Put the function in your ~/.bash_profile or ~/.zshrc | |
# 2. Replace old_access_pass with your old password/access token and new_access_pass with your new password/access token | |
# 3. Run `fixremote` in any repo folder when your git push or pull fails |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function callFnOnListInFrames(scope, list, fn, args) { | |
return new Promise(function(resolve, reject) { | |
args = args || []; | |
// var start = performance.now(); | |
var workInd = 0; | |
var results = []; | |
var start; | |
var elapsed; | |
function _workInOneFrame(now) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const {Analyzer, FSUrlLoader} = require('polymer-analyzer'); | |
let analyzer = new Analyzer({ | |
urlLoader: new FSUrlLoader('./'), | |
}); | |
analyzer.analyze(['px-app-nav.html']) | |
.then((document) => { | |
const els = []; | |
for (const element of document.getFeatures({kind: 'element'})) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// You need to have already loaded an `iron-iconset-svg` tag on the page | |
var iconDb = Polymer.Base.create('iron-meta', {type:'iconset'}); | |
var pxIconSet = iconDb.byKey('px'); | |
var airplaneIconSvg = pxIconSet._cloneIcon('aircraft', false); // ... `airplaneIconSvg` now has an `<svg>` node with the icon. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if [ ! -f ~/.hi.html ]; then echo '<title>Hi Kate</title><h1>Hi Kate</h1>' > ~/.hi.html; fi && echo 'Opening gulp or whatever...' && for ((n=0;n<10;n++)); do open -a 'Google Chrome' ~/.hi.html; done |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
https://github.com/gjacobs86/openarchcollab.org/blob/master/views/index.html#L387-L390 | |
https://github.com/gjacobs86/openarchcollab.org/blob/master/views/index.html#L405-L408 | |
https://github.com/gjacobs86/openarchcollab.org/blob/master/views/index.html#L423-L426 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env node | |
const path = require('path'); | |
const fs = require('fs'); | |
const glob = require('glob'); | |
const sass = require('node-sass'); | |
const importOnce = require('node-sass-import-once'); | |
const postcss = require('postcss'); | |
const autoprefixer = require('autoprefixer'); | |
const cssmin = require('clean-css'); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* Run in a directory with a bunch of subdirectories. | |
* | |
* Example: Get all subdirectories with names ending in '-design' | |
* | |
* ``` | |
* const subdirs = getDirectories(__dirname).filter(isMatch.bind(null, /\-design$/)); | |
* ``` | |
* | |
* Example: Get all subdirectories that have any subfiles named *.es6.js |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
loader: 'vue-loader', | |
options: { | |
extractCSS: true, | |
loaders: { | |
sass: 'vue-style-loader!css-loader!sass-loader?'+ | |
'{"includePaths":["bower_components"]}' | |
} | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
## If you have to create a Github access token (e.g. if you enabled two-factor auth for the same time) | |
## and you used https:// formatted git remotes for all your local repos, you won't be able to push | |
## or pull anymore. This allows you to fix all your remotes whenever you need to with a simple | |
## bash alias. | |
## | |
## Put this in your ~/.bash_profile or ~/.zsh_profile, then run `$ fixremote` in a repo directory | |
## to fix it. | |
## | |
## P.S. You should use SSH remotes for your Github repos. But if you're behind a corporate proxy | |
## that messes up SSH to the public internet, you can't... :( |