A tweet-sized debugger for visualizing your CSS layouts. Outlines every DOM element on your page a random (valid) CSS hex color.
One-line version to paste in your DevTools
Use $$ if your browser aliases it:
~ 108 byte version
| # This function is for scaffolding of drupal project. | |
| # Note : DB must be already created before entering it. | |
| function dsi() { | |
| httpDir=/Applications/MAMP/htdocs | |
| echo -n "Enter the name of Root Directory : " | |
| read rootDir | |
| echo -n "Enter the Site Name : " | |
| read siteName |
All of the below properties or methods, when requested/called in JavaScript, will trigger the browser to synchronously calculate the style and layout*. This is also called reflow or layout thrashing, and is common performance bottleneck.
elem.offsetLeft, elem.offsetTop, elem.offsetWidth, elem.offsetHeight, elem.offsetParentelem.clientLeft, elem.clientTop, elem.clientWidth, elem.clientHeightelem.getClientRects(), elem.getBoundingClientRect()| { | |
| "auto_indent": true, | |
| "bold_folder_labels": true, | |
| "caret_style": "wide", | |
| "color_scheme": "Packages/Seti_UX/Seti.tmTheme", | |
| "default_line_ending": "unix", | |
| "detect_indentation": true, | |
| "detect_slow_plugins": false, | |
| "draw_white_space": "all", | |
| "ensure_newline_at_eof_on_save": true, |
| //---------------------------------------------------------------------- | |
| // Flexbox Containers | |
| // | |
| // The 'flex' value causes an element to generate a block-level flex | |
| // container box. | |
| // | |
| // The 'inline-flex' value causes an element to generate a inline-level | |
| // flex container box. | |
| // |
| 'use strict'; | |
| // ----------------------------------------------------------------------------- | |
| // Dependencies | |
| // ----------------------------------------------------------------------------- | |
| var gulp = require('gulp'); | |
| var sass = require('gulp-sass'); | |
| var sourcemaps = require('gulp-sourcemaps'); |
| <link rel="import" href="../paper-tabs/paper-tabs.html"> | |
| <link rel="import" href="../paper-tabs/paper-tab.html"> | |
| <link rel="import" href="../core-animated-pages/core-animated-pages.html"> | |
| <link rel="import" href="../core-animated-pages/transitions/hero-transition.html"> | |
| <link rel="import" href="../core-animated-pages/transitions/cross-fade.html"> | |
| <link rel="import" href="../core-animated-pages/transitions/slide-down.html"> | |
| <link rel="import" href="../core-animated-pages/transitions/slide-up.html"> | |
| <link rel="import" href="../core-animated-pages/transitions/tile-cascade.html"> | |
| <polymer-element name="my-element"> |
| <link rel="import" href="../core-scaffold/core-scaffold.html"> | |
| <link rel="import" href="../core-header-panel/core-header-panel.html"> | |
| <link rel="import" href="../core-menu/core-menu.html"> | |
| <link rel="import" href="../core-item/core-item.html"> | |
| <link rel="import" href="../core-icon-button/core-icon-button.html"> | |
| <link rel="import" href="../core-toolbar/core-toolbar.html"> | |
| <link rel="import" href="../core-menu/core-submenu.html"> | |
| <polymer-element name="my-element"> |
| # Simple calculator | |
| function calc() { | |
| local result=""; | |
| result="$(printf "scale=10;$*\n" | bc --mathlib | tr -d '\\\n')"; | |
| # └─ default (when `--mathlib` is used) is 20 | |
| # | |
| if [[ "$result" == *.* ]]; then | |
| # improve the output for decimal numbers | |
| printf "$result" | | |
| sed -e 's/^\./0./' `# add "0" for cases like ".5"` \ |
| <link rel="import" href="../topeka-elements/topeka-datasource.html"> | |
| <link rel="import" href="../topeka-elements/category-icons.html"> | |
| <link rel="import" href="../core-icon/core-icon.html"> | |
| <link rel="import" href="../topeka-elements/avatars.html"> | |
| <polymer-element name="my-element"> | |
| <template> | |
| <style> | |
| :host { |