Skip to content

Instantly share code, notes, and snippets.

@HZ-labs
HZ-labs / _decorate.scss
Created August 30, 2012 05:21 — forked from artpolikarpov/_decorate.scss
Сасс-миксин для декорирования блоков на основе одной картинки: http://artgorbunov.ru/bb/soviet/20120830/
// Декорируем фиксированные по высоте блоки
@mixin _decorate($img, $tailTop) {
background-image: image-url($img);
background-repeat: no-repeat;
position: absolute;
width: 50%;
height: image-height($img);
top: 0;
@if $tailTop != 0 {
margin-top: -$tailTop;
@HZ-labs
HZ-labs / Preferences.sublime-settings
Created October 12, 2012 06:42 — forked from robcowie/Preferences.sublime-settings
Example Sublimetext 2 TODO plugin config
{
"color_scheme": "Packages/User/textmate-solarized/Solarized (Dark).tmTheme",
"default_line_ending": "unix",
"dictionary": "Packages/Language - English/en_GB.dic",
"draw_white_space": "selection",
"find_selected_text": true,
"font_face": "menlo",
"font_size": 12,
"highlight_line": true,
@HZ-labs
HZ-labs / server.ls
Created November 2, 2012 19:35 — forked from santoshrajan/server.ls
A LispyScript Server example with nodejs, expressjs, twitter bootstrap
;; http://lispyscript.com
;; LispyScript example using nodejs, expressjs and twitter bootstrap
;; LispyScript templates are written in LispyScript!
;; Html5 templates support all html5 tags
;; The express server
(var express (require "express"))
(var app (express))
(app.listen 3000)
@HZ-labs
HZ-labs / grid.svg
Created December 14, 2012 06:21 — forked from pepelsbey/grid.svg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
ּ_בּ
בּ_בּ
טּ_טּ
כּ‗כּ
לּ_לּ
מּ_מּ
סּ_סּ
תּ_תּ
٩(×̯×)۶
٩(̾●̮̮̃̾•̃̾)۶
@HZ-labs
HZ-labs / dabblet.css
Created February 24, 2013 20:07 — forked from chriscoyier/dabblet.css
Ratings Stars
/*
Ratings Stars
(with as little code as possible)
*/
.rating {
unicode-bidi: bidi-override;
direction: rtl;
text-align: center;
font-size: 45px;
}

The BBC has a server-side image service which provides developers with multiple sized versions of any image they request. It works in a similar fashion to http://placehold.it/ but it also handles the image ratios returned (where as placehold.it doesn't).

The original BBC News process (and my re-working of the script) follows roughly these steps...

  • Create new instance of ImageEnhancer
  • Change any divs within the page (which have a class of delayed-image-load) into a transparent GIF using a Base64 encoded string.
    • We set the width & height HTML attributes of the image to the required size
    • We know what size the image needs to be because each div has custom data-attr set server-side to the size of the image
    • We then set a class of image-replace onto each newly created transparent image
  • We use a 250ms setTimeout to unblock the UI thread and which calls a function resizeImages which enhances the image-replace images so their source is now set to a URL whe
@HZ-labs
HZ-labs / dabblet.css
Created April 15, 2014 15:21
Pounding heart animation
/* Pounding heart animation */
@keyframes pound {
to { transform: rotateY(180deg); }
}
.heart {
display: inline-block;
font-size: 150px;
color: #e00;
@HZ-labs
HZ-labs / dabblet.css
Created April 16, 2014 08:45
The first commented line is your dabblet’s title
/**
* The first commented line is your dabblet’s title
*/
.t1 {
width:100px;
height:100px;
background: #444;
color: #fff;