Skip to content

Instantly share code, notes, and snippets.

@khadorkin
Last active March 24, 2016 19:43
Show Gist options
  • Save khadorkin/10b51ffa7a67965406ea to your computer and use it in GitHub Desktop.
Save khadorkin/10b51ffa7a67965406ea to your computer and use it in GitHub Desktop.
☐ hjkjh
/* eslint-disable */
/* eslint-enable */
"lint": "git diff HEAD --name-only --diff-filter=ACM | grep '.js$' | xargs node node_modules/eslint/bin/eslint.js --quiet",
"lint": "eslint lib",
chrome://serviceworker-internals/
chrome://inspect/#service-workers
process.argv
process.env.npm_lifecycle_event
function requireAuth (nextState, replaceState) {
const state = store.getState()
const isLoggedIn = Boolean(state.application.token)
if (!isLoggedIn)
replaceState({
nextPathname: nextState.location.pathname
}, '/login')
}
requireAuth: function(nextState, transition, callback) {
auth.loggedIn().then(function(loggedIn) {
if (!loggedIn) transition.to('/login');
callback();
});
}
var MediaQuery = React.createClass({
getInitialState: function(){
return {type:'desktop'};
},
childContextTypes: {
type: React.PropTypes.string
},
getChildContext: function() {
return {type: this.state.type};
},
componentDidMount: function(){
var checkMediaQuery = function(){
var type = window.matchMedia("(min-width: 1025px)").matches ? 'desktop' : 'mobile';
if (type !== this.state.type){
this.setState({type:type});
}
};
window.addEventListener('resize', checkMediaQuery);
checkMediaQuery();
},
render: function(){
return this.props.children;
}
});
<meta name="viewport" content="width=device-width,height=device-height,initial-scale=1,maximum-scale=1,minimum-scale=1,user-scalable=no,shrink-to-fit=no,target-densitydpi=device-dpi">
<link rel="search" type="application/opensearchdescription+xml" href="/opensearch.xml" title="<%= htmlWebpackPlugin.options.title %>">
<?xml version="1.0" encoding="UTF-8"?>
<OpenSearchDescription xmlns="http://a9.com/-/spec/opensearch/1.1/" xmlns:moz="http://www.mozilla.org/2006/browser/search/">
<ShortName>DevDocs</ShortName>
<Description>Search API documentation</Description>
<Tags>devdocs</Tags>
<Url type="text/html" method="get" template="http://devdocs.io/#q={searchTerms}"/>
<Image height="16" width="16" type="image/vnd.microsoft.icon">http://cdn.devdocs.io/favicon.ico</Image>
<Image height="64" width="64" type="image/x-icon">http://cdn.devdocs.io/images/icon-64.png</Image>
<InputEncoding>UTF-8</InputEncoding>
<moz:SearchForm>http://devdocs.io</moz:SearchForm>
<Url type="application/opensearchdescription+xml" rel="self" template="http://devdocs.io/opensearch.xml"/>
</OpenSearchDescription>
<link rel="alternate" href="http://devdocs.io/feed" title="<%= htmlWebpackPlugin.options.title %>" type="application/atom+xml">
<link rel='help' title='FAQ' href='/faq'>
<link rel='logo' type='image/svg' href='https://playfoursquare.s3.amazonaws.com/press/logo/foursquare-logo.svg'>
<link rel='P3Pv1' href='/w3c/p3p.xml'>
<link rel='publisher' href='https://plus.google.com/115081025762845243709/'>
<meta name="msapplication-notification" content="frequency=30; polling-uri=notifications/contoso1.xml;
polling-uri2=notifications/contoso2.xml; polling-uri3=notifications/contoso3.xml" />
<?xml version="1.0" encoding="utf-8" ?>
<browserconfig>
<msapplication>
<tile>
<square70x70logo src="images/win8LogoSmall.png"/>
<square150x150logo src="images/win8LogoMedium.png"/>
<wide310x150logo src="images/win8LogoWide.png"/>
<square310x310logo src="images/win8LogoLarge.png"/>
<TileColor>#6CBD45</TileColor>
</tile>
<notification>
<polling-uri src="http://orydberg.azurewebsites.net/Notifications/TileNotifications.xml"/>
<polling-uri2 src="http://orydberg.azurewebsites.net/Notifications/TileNotifications2.xml"/>
<polling-uri3 src="http://orydberg.azurewebsites.net/Notifications/TileNotifications3.xml"/>
<frequency>360</frequency>
<cycle>1</cycle>
</notification>
</msapplication>
</browserconfig>
<tile>
<visual lang="en-US" version="2">
<binding template="TileSquare150x150Text04" branding="logo" fallback="TileSquareImage">
<text id="1">Audio In The Browser</text>
</binding>
<binding template="TileWide310x150Text09" branding="logo" fallback="TileWideImage">
<text id="Text1">Audio In The Browser</text>
<text id="2">Your web browser is usually very silent, it does not talk or play any music...</text>
</binding>
<binding template="TileSquare310x310TextList02" branding="logo" contentId="http://orydberg.com/Posts/2013/5_AudioInTheBrowser.aspx">
<text id="Text2">Audio In The Browser</text>
<text id="Text3">How to sort a C# List</text>
<text id="3">Basics of CSS3 styling of HTML5 blog post</text>
</binding>
</visual>
</tile>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment