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
| ChromeSnippets |
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
| // ==ClosureCompiler== | |
| // @compilation_level ADVANCED_OPTIMIZATIONS | |
| // @externs_url http://closure-compiler.googlecode.com/svn/trunk/contrib/externs/maps/google_maps_api_v3.js | |
| // ==/ClosureCompiler== | |
| /** | |
| * @name CSS3 InfoBubble with tabs for Google Maps API V3 | |
| * @version 0.8b | |
| * @author Luke Mahe (default properties and additional classes by Vitaly Sergeev) | |
| * @fileoverview |
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
| // Protractor keys | |
| // Extracted from https://github.com/SeleniumHQ/selenium/blob/d943ee2950e25a2f4a3492058107cfd005d6f7fd/javascript/node/selenium-webdriver/lib/input.js#L44 | |
| const Key = { | |
| NULL: '\uE000', | |
| CANCEL: '\uE001', // ^break | |
| HELP: '\uE002', | |
| BACK_SPACE: '\uE003', | |
| TAB: '\uE004', | |
| CLEAR: '\uE005', | |
| RETURN: '\uE006', |
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
| @HostListener('window:beforeunload', ['$event']) | |
| unloadNotification($event: any) { | |
| if (this.hasUnsavedData()) { | |
| $event.returnValue =true; | |
| } | |
| } |
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
| cluster = require 'cluster' | |
| numCPUs = require('os').cpus().length | |
| exports = module.exports = launch: -> | |
| console.log 'Before the fork' | |
| if (cluster.isMaster) | |
| console.log 'I am the master, launching workers!' | |
| cluster.fork() for i in [0...numCPUs] | |
| else |
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 puppeteer = require('puppeteer'); | |
| (async () => { | |
| const browser = await puppeteer.launch(); | |
| const page = await browser.newPage(); | |
| // Adjustments particular to this page to ensure we hit desktop breakpoint. | |
| page.setViewport({width: 1000, height: 600, deviceScaleFactor: 1}); | |
| await page.goto('https://www.chromestatus.com/samples', {waitUntil: 'networkidle'}); |
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
| // XPath CheatSheet | |
| // To test XPath in your Chrome Debugger: $x('/html/body') | |
| // http://www.jittuu.com/2012/2/14/Testing-XPath-In-Chrome/ | |
| // 0. XPath Examples. | |
| // More: http://xpath.alephzarro.com/content/cheatsheet.html | |
| '//hr[@class="edge" and position()=1]' // every first hr of 'edge' class |
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
| var gulp = require('gulp'); | |
| var imageResize = require('gulp-image-resize'); | |
| var rename = require("gulp-rename"); | |
| var parallel = require("concurrent-transform"); | |
| var os = require("os"); | |
| gulp.task("parallel", function () { | |
| console.log("os.cpus().length = ",os.cpus().length); | |
| gulp.src("shots/**/*px.{jpg,png}") | |
| .pipe(parallel( |
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
| .u-block { | |
| display: block !important | |
| } | |
| .u-hidden { | |
| display: none !important | |
| } | |
| .u-full { | |
| width: 100% !important |
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
| .u-space-an { margin: 0 !important; } | |
| .u-space-vn { margin-top: 0 !important; margin-bottom: 0 !important; } | |
| .u-space-tn { margin-top: 0 !important; } | |
| .u-space-rn { margin-right: 0 !important; } | |
| .u-space-bn { margin-bottom: 0 !important; } | |
| .u-space-ln { margin-left: 0 !important; } | |
| .u-space-as { margin: .5em!important; } | |
| .u-space-vs { margin-top: .5em!important; margin-bottom: .5em!important; } | |
| .u-space-ts { margin-top: .5em!important; } |
NewerOlder