The true cause of frontend SPOF is loading a script, stylesheet, or font file in a blocking manner.
This file contains 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
# Set Up Launch Agent to Run On Startup | |
function set_launch_agent() { | |
# retrieve the dependency's prefix | |
DEP_PREFIX=$(brew --prefix ${1}) | |
# make the user local LaunchAgents directory (skip if already exists) | |
mkdir -p ~/Library/LaunchAgents | |
# copy brew generated plist to LaunchAgent | |
cp $DEP_PREFIX/*${1}*.plist ~/Library/LaunchAgents/ | |
# load the agent now | |
launchctl load -w ~/Library/LaunchAgents/*${1}*.plist |
This file contains 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
// @see https://github.com/cypress-io/cypress/issues/915#issuecomment-475862672 | |
// Modified due to changes to `cy.queue` https://github.com/cypress-io/cypress/pull/17448 | |
// Note: this DOES NOT run Promises in parallel like `Promise.all` due to the nature | |
// of Cypress promise-like objects and command queue. This only makes it convenient to use the same | |
// API but runs the commands sequentially. | |
declare namespace Cypress { | |
type ChainableValue<T> = T extends Cypress.Chainable<infer V> ? V : T | |
interface cy { |
This file contains 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
/** | |
* Credits | |
* @Bkucera: https://github.com/cypress-io/cypress/issues/2839#issuecomment-447012818 | |
* @Phrogz: https://stackoverflow.com/a/10730777/1556245 | |
* | |
* Usage | |
* ``` | |
* // Types "foo" and then selects "fo" | |
* cy.get('input') | |
* .type('foo') |
This file contains 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
<?xml version="1.0"?> | |
<!DOCTYPE lolz [ | |
<!ENTITY lol "lol"> | |
<!ELEMENT lolz (#PCDATA)> | |
<!ENTITY lol1 "&lol;&lol;&lol;&lol;&lol;&lol;&lol;&lol;&lol;&lol;"> | |
<!ENTITY lol2 "&lol1;&lol1;&lol1;&lol1;&lol1;&lol1;&lol1;&lol1;&lol1;&lol1;"> | |
<!ENTITY lol3 "&lol2;&lol2;&lol2;&lol2;&lol2;&lol2;&lol2;&lol2;&lol2;&lol2;"> | |
<!ENTITY lol4 "&lol3;&lol3;&lol3;&lol3;&lol3;&lol3;&lol3;&lol3;&lol3;&lol3;"> | |
<!ENTITY lol5 "&lol4;&lol4;&lol4;&lol4;&lol4;&lol4;&lol4;&lol4;&lol4;&lol4;"> | |
<!ENTITY lol6 "&lol5;&lol5;&lol5;&lol5;&lol5;&lol5;&lol5;&lol5;&lol5;&lol5;"> |
This file contains 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
import Ember from 'ember'; | |
export default Ember.Component.extend({ | |
logger: Ember.inject.service() | |
}); |
This file contains 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
// ASAP Library | |
// use case | |
/* | |
add omniture to registry | |
omniture tags are waiting to fire | |
asap loads omniture asynchronously | |
page waits for omniture to be ready | |
omniture loads | |
asap announces omniture is ready |
This file contains 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
import Ember from 'ember'; | |
export default Ember.Component.extend({ | |
init(options) { | |
console.log('init', options); | |
}, | |
didUpdateAttrs(options) { | |
console.log('didUpdateAttrs', options); | |
}, |
This file contains 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
npm ls --depth 0 -g |
This file contains 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
// this would be set in a closure | |
// but leave some values to be cached (ie not created every function call) | |
// and the ability to override | |
var norm_regex = /\s+/g; | |
var norm_replace = "_"; | |
function normalize( val, reg_pattern, separator ) { | |
// convert to string | |
var norm_val = val+""; | |
norm_regex = reg_pattern || norm_regex; |
NewerOlder