Skip to content

Instantly share code, notes, and snippets.

View lnked's full-sized avatar
🧠
I may be slow to respond.

Edik Bulikyan lnked

🧠
I may be slow to respond.
View GitHub Profile
$(".tooltip-trigger").on('mouseenter', function (e) {
var $block = $(this).closest('.tooltip-container');
if( !$block.hasClass('awards_icon-disabled') )
{
if( $block.find('.tooltip').length == 0 )
{
var tooltip = $(this).data('tooltip');
if( typeof tooltip !== 'undefined' && tooltip !== '' )
@lnked
lnked / javascript_resources.md
Created June 5, 2014 00:57 — forked from jookyboi/javascript_resources.md
Here are a set of libraries, plugins and guides which may be useful to your Javascript coding.

Libraries

  • jQuery - The de-facto library for the modern age. It makes things like HTML document traversal and manipulation, event handling, animation, and Ajax much simpler with an easy-to-use API that works across a multitude of browsers.
  • Backbone - Backbone.js gives structure to web applications by providing models with key-value binding and custom events, collections with a rich API of enumerable functions, views with declarative event handling, and connects it all to your existing API over a RESTful JSON interface.
  • AngularJS - Conventions based MVC framework for HTML5 apps.
  • Underscore - Underscore is a utility-belt library for JavaScript that provides a lot of the functional programming support that you would expect in Prototype.js (or Ruby), but without extending any of the built-in JavaScript objects.
  • lawnchair - Key/value store adapter for indexdb, localStorage
@lnked
lnked / css_resources.md
Created June 5, 2014 00:57 — forked from jookyboi/css_resources.md
CSS libraries and guides to bring some order to the chaos.

Libraries

  • 960 Grid System - An effort to streamline web development workflow by providing commonly used dimensions, based on a width of 960 pixels. There are two variants: 12 and 16 columns, which can be used separately or in tandem.
  • Compass - Open source CSS Authoring Framework.
  • Bootstrap - Sleek, intuitive, and powerful mobile first front-end framework for faster and easier web development.
  • Font Awesome - The iconic font designed for Bootstrap.
  • Zurb Foundation - Framework for writing responsive web sites.
  • SASS - CSS extension language which allows variables, mixins and rules nesting.
  • Skeleton - Boilerplate for responsive, mobile-friendly development.

Guides

@lnked
lnked / multiple-gulp-streams.js
Created June 3, 2016 01:24 — forked from jakebellacera/multiple-gulp-streams.js
How to run multiple streams in a single gulp task.
var es = require("event-stream");
var gulp = require("gulp");
// Important! If these tasks need to be ran sequentially, then specify the
// task(s) that need to be ran prior to these ones as a dependency.
gulp.task("move-files", function() {
return es.merge([
gulp.src("foo").pipe(gulp.dest("dist/")),
gulp.src("bar").pipe(gulp.dest("dist/")),
gulp.src("baz").pipe(gulp.dest("dist/")),
@lnked
lnked / force_new_tab.php
Created June 3, 2016 01:24 — forked from jakebellacera/force_new_tab.php
Force PDF links to open in a new tab in PHP.
$new_text = preg_replace(
'/((<a (?=.*\.pdf)(?!.*target="_blank").*?)>)/',
'$2 target="_blank">',
$old_text
);
@lnked
lnked / main.yml
Created January 27, 2017 22:48 — forked from Stubbs/main.yml
Ansible Playbook to install PHP7
- name: Install Packages Needed To Compile PHP 7
apt: pkg={{ item }} state=latest
with_items:
- git
- autoconf
- bison
- libxml2-dev
- libbz2-dev
- libmcrypt-dev
- libcurl4-openssl-dev
@lnked
lnked / svgfixer.js
Created February 7, 2017 22:48 — forked from leonderijke/svgfixer.js
Fixes references to inline SVG elements when the <base> tag is in use.
/**
* SVG Fixer
*
* Fixes references to inline SVG elements when the <base> tag is in use.
* Firefox won't display SVG icons referenced with
* `<svg><use xlink:href="#id-of-icon-def"></use></svg>` when the <base> tag is on the page.
*
* More info:
* - http://stackoverflow.com/a/18265336/796152
* - http://www.w3.org/TR/SVG/linking.html
@lnked
lnked / gist:5fd440af19bf67b8616bcfb96640088d
Created April 28, 2017 20:26 — forked from MrRoyce/gist:280063164a5f744cb0ec3ecc36be84a7
webpack.config.js to debug problem with Module not found: Error: Cannot resolve module 'babel-runtime'
/**
* @Author: Royce
* @Date: 2016-06-12T10:54:44-04:00
* @Email: rharding@tonight.com
* @Project: Tonight
* @Last modified by: royce
* @Last modified time: 2016-09-23T19:58:59-04:00
* @License: © 2016 Tonight LLC All Rights Reserved
*/
@lnked
lnked / gist:7e2e5d016c40679efea930de70dd9a8d
Created May 17, 2017 15:48 — forked from realmyst/gist:1262561
Склонение числительных в 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, ['найдена', 'найдено', 'найдены']);
'use strict';
const webpack = require('webpack');
const { resolve } = require('path');
const rules = require('./rules');
const define = require('./define');
const plugins = require('./plugins');
module.exports = {