Skip to content

Instantly share code, notes, and snippets.

@borbit
borbit / squash-steps.md
Created June 27, 2018 15:16 — forked from kunik/squash-steps.md
Як ми сквошимо коміти в один?

Переходимо в master і витягуємо останні зміни

git checkout master
git pull

На основі master створюємо новий тимчасовий бранч

.block__element_modifier {
/* visibility */
display: block;
visibility: visible;
overflow: hidden;
/* positioning */
position: absolute;
z-index: 1;
left: 0;
@borbit
borbit / redis_cas.js
Last active March 3, 2021 11:46
CAS implementation for Redis.
var LUA_GETS =
'return {'
+ 'redis.call(\'get\', KEYS[1]),'
+ 'redis.call(\'get\', KEYS[1]..\'_ver\')'
+ '}';
var LUA_CAS =
'local ver = redis.call(\'get\', KEYS[1]..\'_ver\') '
+ 'if not ver or ver == KEYS[3] '
+ 'then '
@borbit
borbit / backbone
Created May 4, 2011 12:42
bug/feature in the backbone
<!DOCTYPE HTML>
<html>
<head>
<script src="http://documentcloud.github.com/underscore/underscore-min.js"></script>
<script src="http://documentcloud.github.com/backbone/backbone-min.js"></script>
</head>
<body>
<script>
var Model = Backbone.Model.extend({
/**
* componenets.pager
* Pagination component
*
* @example
* var pager = new SPG.components.pager({
* itemsQuantity: 1000,
* itemsPerPage: 10,
* displayPagesQuantity: 7,
* currentPageNumber: 1,