Skip to content

Instantly share code, notes, and snippets.

View birdkiwi's full-sized avatar
🏠
Working from home

Bird Kiwi birdkiwi

🏠
Working from home
View GitHub Profile
@zlove
zlove / jquery.bxslider-alt.js
Last active January 24, 2018 19:58
Wrap bxSlider so that we can override options per slider with data attributes.
;(function ($) {
/**
* Return an object consisting of properties of 'data'
* that match the regex 'pattern'. If trim is not false,
* trim the matched 'pattern' from the property name,
* and make the first char of the remaining property
* name lowercase.
*/
function filterData(data, pattern, trim) {
var data,
@JamesMGreene
JamesMGreene / gitflow-breakdown.md
Last active November 5, 2024 15:51
`git flow` vs. `git`: A comparison of using `git flow` commands versus raw `git` commands.

Initialize

gitflow git
git flow init git init
  git commit --allow-empty -m "Initial commit"
  git checkout -b develop master

Connect to the remote repository

@realmyst
realmyst / gist:1262561
Created October 4, 2011 19:34
Склонение числительных в javascript
function declOfNum(number, titles) {
cases = [2, 0, 1, 1, 1, 2];
return titles[ (number%100>4 && number%100<20)? 2 : cases[(number%10<5)?number%10:5] ];
}
use:
declOfNum(count, ['найдена', 'найдено', 'найдены']);