Адская разметка http://pastie.org/9625163
Английская версия: https://evilmartians.com/chronicles/bootstrap-an-intervention
У CSS есть несколько базовых проблем, которые позволяют очень быстро отстрелить себе ногу при неправильном использовании:
-
Глобальный неймспейс – в серверном программировании все что написано в файле, в файле и остается. Все же что написано в css и js засирает глобальное пространство имен со всеми вытекающими. В JS эту проблему сейчас побороли всякими модульными системами, а вот с css сложнее. В идеальном мире это должен починить Shadow DOM и настоящие Web Components, но пока их нет единственный способ с этим бороться – следовать какой-то системе именований селекторов, которая по возможности уменьшает и исключает возможные конфликты.
-
Каскадность – если на один элемент может сработать несколько правил, то они все и сработают последовательно. Если есть элемент
h1.title, на него сработают все правила для теговh1и все правила для класса.title. Так как весь html состоит из тегов, то правил которые п
| # Libre/OpenOffice: Export selected or all figures as EPS | |
| # 2010 Brecht Machiels | |
| # | |
| # Usage: | |
| # - drop script in user scripts folder | |
| # Max OSX: $HOME/Library/Application Support/LibreOffice/4/user/scripts/python/ | |
| # (Arch) Linux: $HOME/.config/libreoffice/4/user/Scripts/python/ | |
| # other Linux: $HOME/.libreoffice/4/user/Scripts/python/ | |
| # Windows: C:\Document and Settings\<username>\Application Data\libreoffice\4\user\Scripts\python | |
| # - start Draw and draw some figures |
| <? | |
| ///////////////////// | |
| // slack2html | |
| // by @levelsio | |
| ///////////////////// | |
| // | |
| ///////////////////// | |
| // WHAT DOES THIS DO? | |
| ///////////////////// | |
| // |
| <html><HEAD> | |
| <link type="text/css" rel="stylesheet" href="/static/css/banner-styles.css"/> | |
| <TITLE>Verslas-Banga</TITLE> | |
| <META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=windows-1257"> | |
| <!-- Software, design (C) UAB Metasite (www.metasite.net) --> | |
| <base href="/web/20071025011434/http://verslas.banga.lt/"> | |
| <LINK REL="stylesheet" TYPE="text/css" HREF="stuff/style.css" TITLE="web"> |
| /** | |
| * Reminder script for GMail: A simple Google Apps Script to create a Google Calendar event (reminder) for any mail (with a | |
| * specific label). You can then setup ("timed") triggers in Apps Script (hourly, etc) to monitor your Inbox. | |
| * How to Use: | |
| * 1. Log into Google Drive account and create a Google Script. | |
| * 2. Copy and paste the below snippet into the gs file. | |
| * 3. Make sure to update the 'reminderLabel', 'calendarName' and 'reminderDuration' as per your preference. | |
| * 4. Test the script to make sure it is working properly. | |
| * 5. Setup a time-driven Project Trigger (hourly, etc) to automatically run this script and create calendar events. | |
| * |
| function getJSON(aUrl,sheetname) { | |
| //var sheetname = "test"; | |
| //var aUrl = "http://pipes.yahoo.com/pipes/pipe.run?_id=286bbb1d8d30f65b54173b3b752fa4d9&_render=json"; | |
| var response = UrlFetchApp.fetch(aUrl); // get feed | |
| var dataAll = JSON.parse(response.getContentText()); // | |
| var data = dataAll.value.items; | |
| for (i in data){ | |
| data[i].pubDate = new Date(data[i].pubDate); | |
| data[i].start = data[i].pubDate; | |
| } |
| function Edit-XmlNodes { | |
| param ( | |
| [xml] $doc = $(throw "doc is a required parameter"), | |
| [string] $xpath = $(throw "xpath is a required parameter"), | |
| [string] $value = $(throw "value is a required parameter"), | |
| [bool] $condition = $true | |
| ) | |
| if ($condition -eq $true) { | |
| $nodes = $doc.SelectNodes($xpath) | |
| <iframe class="s1i518j4-2 bLslTo" src="https://www.reddit.com/login"></iframe> | |
| <!DOCTYPE html> | |
| <html lang="en"> | |
| <head> | |
| <title>reddit.com: Log in</title> | |
| <link rel="shortcut icon" type="image/png" sizes="512x512" href="https://www.redditstatic.com/accountmanager/favicon/favicon-512x512.png"> | |
| <link rel="shortcut icon" type="image/png" sizes="192x192" href="https://www.redditstatic.com/accountmanager/favicon/favicon-192x192.png"> | |
| <link rel="shortcut icon" type="image/png" sizes="32x32" href="https://www.redditstatic.com/accountmanager/favicon/favicon-32x32.png"> | |
| <link rel="shortcut icon" type="image/png" sizes="16x16" href="https://www.redditstatic.com/accountmanager/favicon/favicon-16x16.png"> |
