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
// It is important to declare your variables. | |
(function() { | |
var foo = 'Hello, world!'; | |
print(foo); //=> Hello, world! | |
})(); | |
// Because if you don't, the become global variables. | |
(function() { |
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
<!doctype html> | |
<html> | |
<head> | |
<meta http-equiv="X-UA-Compatible" content="IE=9; IE=8; IE=7; IE=EDGE" /> | |
<meta charset="UTF-8"> | |
<title>Untitled Document</title> | |
<link href='bootstrap/css/bootstrap.min.css' rel='stylesheet' /> | |
<style type='text/css'> | |
#carousel-custom { | |
margin: 20px auto; |
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
<snippet> | |
<content><![CDATA[ | |
<!-- begin $1 --> | |
<div class="$1"> | |
$2 | |
</div> | |
<!-- end $1 --> | |
]]></content> | |
<!-- Optional: Set a tabTrigger to define how to trigger the snippet --> | |
<tabTrigger>di</tabTrigger> |
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
Afghanistan | |
Albania | |
Algeria | |
Andorra | |
Angola | |
Antigua & Deps | |
Argentina | |
Armenia | |
Australia | |
Austria |
- Блок с прокруткой в вертикальном флексбоксе не работает — ставить
max-height: 100%
на контейнер word-wrap: break-word
не работает внутри флексбокса — спасаетmin-width: 0
на элементе флексбокса (overflow-x: hidden
тоже работает)- Флексбокс не работает на кнопке — класть внутрь блок и на нем делать флексбокс
- Элемент флексбокса с
ellipsis
расфигачивает все по ширине —min-width: 0
на флексбокс /max-width: 100%
на самого верхнего разъехавшегося родителя - Элементы флексбокса не выравниваются по базовой линии, если внутри еще один флексбокс — использовать
inline-flex
О других невероятных приключениях вы узнаете в следующей серии
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
// | |
// Ok look, I know this is a bad idea but I'm doing this as an experiment. I'm going to get really granular with these, | |
// which makes them basically unsuable. But it gives a decent overview of the diversity of iThangs. | |
// So chill. | |
// | |
// References: | |
// http://www.paintcodeapp.com/news/ultimate-guide-to-iphone-resolutions | |
// https://developer.mozilla.org/en-US/docs/Web/Guide/CSS/Media_queries#-moz-device-pixel-ratio | |
// http://stephen.io/mediaqueries/ | |
// |
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
function sec2time(timeInSeconds) { | |
var pad = function(num, size) { return ('000' + num).slice(size * -1); }, | |
time = parseFloat(timeInSeconds).toFixed(3), | |
hours = Math.floor(time / 60 / 60), | |
minutes = Math.floor(time / 60) % 60, | |
seconds = Math.floor(time - minutes * 60), | |
milliseconds = time.slice(-3); | |
return pad(hours, 2) + ':' + pad(minutes, 2) + ':' + pad(seconds, 2) + ',' + pad(milliseconds, 3); | |
} |
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
<!DOCTYPE html> | |
<html lang="en"> | |
<!-- | |
A sample framework for the ESA-NASA WebWorldWind web applications. | |
Author: Bruce Schubert | |
License: MIT | |
See: https://worldwind.arc.nasa.gov/web/ | |
--> | |
<head> | |
<meta charset="utf-8"> |
OlderNewer