- Почему решили покинуть предыдущее место работы?
- В чем разница между inline, block, inline-block?
- Чем отличается margin от padding?
- Что такое overflow, когда он нужен?
- Чем отличаются position static, absolute, relative, fixed?
| var myClass = (function () { | |
| var properties = { | |
| foo: 'bar' | |
| }; | |
| var obj = function () {}; | |
| obj.prototype = { | |
| get: function (key) { | |
| return this['get' + cfirst(key)](); | |
| }, | |
| set: function (key, value) { |
| <snippet> | |
| <content><![CDATA[ | |
| <div class="$1"> | |
| $2 | |
| </div><!-- .$1 --> | |
| ]]></content> | |
| <!-- Optional: Set a tabTrigger to define how to trigger the snippet --> | |
| <tabTrigger>di</tabTrigger> | |
| <!-- Optional: Set a scope to limit where the snippet will trigger --> | |
| <scope>text.html</scope> |
| <?php | |
| // thanks to: http://stackoverflow.com/a/19575620/2039203 | |
| $DBUSER="user"; | |
| $DBPASSWD="password"; | |
| $DATABASE="user_db"; | |
| $filename = $_SERVER['HTTP_HOST'] . "-" . date("d-m-Y") . ".sql.gz"; | |
| $mime = "application/x-gzip"; |
| /* if portrait mode is detected, rotate the entire site -90 degrees to hint rotating to landscape */ | |
| @media (orientation: landscape) { | |
| body { | |
| -webkit-transform: rotate(-90deg); | |
| -moz-transform: rotate(-90deg); | |
| -o-transform: rotate(-90deg); | |
| -ms-transform: rotate(-90deg); | |
| transform: rotate(-90deg); | |
| } | |
| } |
| @media only screen and (min-device-width : 320px) and (max-device-width : 568px) and (orientation : landscape) { | |
| html { | |
| background: #333; | |
| } | |
| body:before { | |
| content: "Turn your phone to portrait"; | |
| color: #888; | |
| font-size: 11px; | |
| text-transform: uppercase; |
| (function() { | |
| /** | |
| * Simple script to search developers by the Location (city, country) in the "stargazers" list of repository. | |
| * To use it, simple go to the `/[your-repo]/stargazers` url, open console and execute this script. You will | |
| * see profile links in the console (console.info()) output | |
| * | |
| * https://gist.github.com/SleepWalker/e6f54de8dfa625b37974 | |
| */ | |
| var usersParsed = 0, | |
| found = 0; |
| /** | |
| * Outputs a new function with interpolated object property values. | |
| * Use like so: | |
| * var fn = makeInterpolator('some/url/{param1}/{param2}'); | |
| * fn({ param1: 123, param2: 456 }); // => 'some/url/123/456' | |
| */ | |
| var makeInterpolator = (function() { | |
| var rc = { | |
| '\n': '\\n', '\"': '\\\"', | |
| '\u2028': '\\u2028', '\u2029': '\\u2029' |
Forked from Captain Anonymous's Pen LEEOpG.
A Pen by Sviatoslav on CodePen.
| (function addXhrProgressEvent($) { | |
| // Patch for progress event support | |
| var originalXhr = $.ajaxSettings.xhr; | |
| $.ajaxSetup({ | |
| progress: $.noop, | |
| xhr: function() { | |
| var xhr = originalXhr(), that = this; | |
| if (xhr) { | |
| if (typeof xhr.addEventListener == "function") { |