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
/** | |
* The first commented line is your dabblet’s title | |
*/ | |
/* hello */ | |
background: #f06; | |
background: linear-gradient(45deg, #f06, yellow); | |
min-height: 100%; |
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
<?php | |
$rate = (float) 32.0115; | |
echo '<script>rate = ' . $rate . ';</script>'; | |
?> | |
<script> | |
function check(i, result) | |
{ |
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
<div class="social-likes"> | |
<script> | |
var apiKeys = {}; | |
if (window.location.host == 'desigens.com'){ | |
apiKeys.facebook = 423331257722136; | |
apiKeys.vkontakte = 3219170; | |
} | |
</script> | |
<div class="social-likes__facebook"> | |
<div id="fb-root"></div> |
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
-moz-box-sizing: border-box; | |
-webkit-box-sizing: border-box; | |
box-sizing: border-box; |
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
# Если REST еще не рализован или сломался, можно быстро сэмулировать ответ сервера с нужным JSON. | |
# | |
# 1. Создаем json-файл с нужныи ответом | |
# 2. Перенастраиваем NGINX, для нужного URL. | |
# Например, нужно, чтобы по адресу http://localhost/service_template/unistream/find_person/* | |
# сервер отдавал содержимое файла /home/desigens/shared/payment-agregator/fake/unistream-error.json | |
# Конфиг такой: | |
# Fake REST |
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
// Sticky | |
(function (el, topOffset) { | |
var $el = $(el).eq(0), | |
width = $el.outerWidth(), | |
coords = $el.offset(), | |
isSticky = false; | |
topOffset = topOffset || 0; | |
function relative() { |
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
$.getScript('//code.jquery.com/ui/1.10.4/jquery-ui.js', function () { | |
function toFixed(value, precision) { | |
var power = Math.pow(10, precision || 0), | |
strip = value * power; | |
return Math.round(parseFloat(strip.toPrecision(12))) / power; | |
} | |
function format(x) { | |
x = x.toString().split('.') |
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
// Cheat for http://game.ioxapp.com/color/ | |
(function () { | |
function detectUnique() { | |
var $boxes = $('#box span'); | |
colors = {}; |
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
/** | |
* PhantomJS script to get page initialisation average time. | |
* Using: ```$ phantom pagespeed.js http://mypage.com 10``` | |
**/ | |
var _ = require('underscore'); | |
var webpage = require('webpage'); | |
var url = process.argv[2] || 'http://google.com'; | |
var times = 5 || process.argv[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> | |
<head> | |
<title></title> | |
<style type="text/css"> | |
body.a { | |
background: url(http://ololo.com/i.png) no-repeat; | |
} | |
</style> | |
</head> |
OlderNewer