Skip to content

Instantly share code, notes, and snippets.

View a-ignatov-parc's full-sized avatar

Anton Ignatov a-ignatov-parc

View GitHub Profile
@sapegin
sapegin / grunt.js
Created August 15, 2012 08:42
Sapegin.me gruntfile
@madrobby
madrobby / gist:3161015
Created July 22, 2012 20:43
Detect retina support. Tested on iOS, Android 2.x, Chrome for Android, Safari on MacBook Pro Retina, Firefox mobile (beta) for Android, Opera Mobile (Android)
function isRetina(){
return (('devicePixelRatio' in window && devicePixelRatio > 1) ||
('matchMedia' in window && matchMedia("(min-resolution:144dpi)").matches))
}
@andreychev
andreychev / detectIPadVersion.js
Created July 21, 2012 15:33
Функция для определия модели Айпеда.
// функция для определения модели Айпада
function detectIPadVersion(callback, undefined) {
if ('ondevicemotion' in window) {
window.addEventListener('devicemotion', function self(event) {
if (~navigator.platform.indexOf('iPad')) {
var version = event.acceleration ? (window.devicePixelRatio === 2) + 2 : 1;
}
window.removeEventListener('devicemotion', self);
callback(version);
@a-ignatov-parc
a-ignatov-parc / gist:3045497
Created July 4, 2012 05:16
Примеры форматирования чейнинга в коде
// Нету чейнинга
this.$el.find('.js-search_city-suggest');
// Чейнинг без присваивания
this.$el
.find('.js-search_city-suggest')
.typeahead();
// Чейнинг с присваиванием в переменную
var city = this.$el
@mystix
mystix / setup-php-dev.sh
Last active April 27, 2023 15:46
(OSX 10.7.x/10.8.x + Homebrew + nginx + mysql + php 5.4 + php-fpm + apc + xdebug) development environment
#!/bin/bash
# install homebrew's official php tap
brew tap josegonzalez/homebrew-php
# install homebrew-dupes (required to install zlib, php54's dependency)
brew tap homebrew/dupes
# install nginx + mysql + php 5.4 + php-fpm + apc + xdebug
brew install nginx mysql
@paulmillr
paulmillr / active.md
Last active September 23, 2025 16:13
Most active GitHub users (by contributions). https://paulmillr.com

Most active GitHub users (git.io/top)

The list would not be updated for now. Don't write comments.

The count of contributions (summary of Pull Requests, opened issues and commits) to public repos at GitHub.com from Wed, 21 Sep 2022 till Thu, 21 Sep 2023.

Because of GitHub search limitations, only 1000 first users according to amount of followers are included. If you are not in the list you don't have enough followers. See raw data and source code. Algorithm in pseudocode:

githubUsers
<!doctype html>
<!-- http://taylor.fausak.me/2015/01/27/ios-8-web-apps/ -->
<html>
<head>
<title>iOS 8 web app</title>
<!-- CONFIGURATION -->
@a-ignatov-parc
a-ignatov-parc / example.html
Created February 7, 2012 08:14
Верстка и js блока со скролингом
<div class="l-scroll_pane-container">
<div class="l-scroll_pane-work_area">
<ul class="l-scroll_pane g-clrfix">
<li class="b-categories-item ">
<input type="hidden" value="d64d7a39-3045-4206-a843-42c816ad7f04">
<div class="b-categories-image b-categories-image--object"></div>
<p class="b-categories-name">Товары</p>
</li>
<li class="b-categories-item b-categories-item--active">
<input type="hidden" value="9c4c930a-26bd-4ec9-9fc3-727f26e0ed0f">
@madrobby
madrobby / gist:1362093
Created November 13, 2011 13:04
Force rendering a DOM element when Webkit is acting up
forceRerenderOnWebkit: ->
@el.parentNode.style.cssText += ';-webkit-transform:rotateZ(0deg)'
@el.parentNode.offsetHeight
@el.parentNode.style.cssText += ';-webkit-transform:none'
@nuxlli
nuxlli / localstorage.js
Created November 2, 2011 15:28
Fallback to localStorage in Samsung Smart TV
/**
* Fallback to localStorage
**/
;(function() {
if (typeof localStorage == "undefined" && typeof FileSystem == "function") {
var fileSyObj = new FileSystem();
var fileName = curWidget.id + "_localStorage.db";
var lStorage = {};
var changed = false;