Skip to content

Instantly share code, notes, and snippets.

View JiLiZART's full-sized avatar
💭
I may be slow to respond.

Nikolay Kost JiLiZART

💭
I may be slow to respond.
View GitHub Profile
@JiLiZART
JiLiZART / make.js
Created October 1, 2015 21:45
client BH
var enbBemTechs = require('enb-bem-techs'),
borschikTech = require('enb-borschik/techs/borschik'),
fs = require('fs'),
path = require('path'),
techs = enbBemTechs,
provide = require('enb/techs/file-provider');
// php
// process.env.YENV = 'production';
enbBhPhp = require('enb-bh-php');
//wpPhp = require('./techs/wp-php.js');
@JiLiZART
JiLiZART / sites.json
Created June 8, 2014 15:11
Sites sorted by category
{
"programming":[
"http://blog.codinghorror.com/",
"http://thedailywtf.com/",
"http://www.hanselman.com/blog/",
"http://code.tutsplus.com",
"https://news.ycombinator.com/",
"http://www.reddit.com/r/programming/",
"http://codebetter.com",
"http://android-developers.blogspot.com/",

Using Pseudo Elements for Input Styling

On supported browsers, the pseudo elements can be used to style the inputs for checkbox/radio for their checked and unchecked states while still providing a functional fallback for browsers that don't support input styling without doing weird resets. Most notable issue is pseudo elements not existing for inputs on firefox. Check it out in Chrome & Safari.

A Pen by Alex Bergin on CodePen.

License.

###
# Retina images handler
###
if ($http_cookie ~* "isRetina=1" ) {
set $isRetina "retina";
}
location ~ ^/bundles/(.*)-retina\.png {
try_files /bundles/$1-retina.png @retinaFallback;
}
@JiLiZART
JiLiZART / EActiveRecordAsArrayBehavior.php
Last active December 17, 2015 17:59
Extends base yii CActiveRecord, for return results as array
<?php
/**
* Class EActiveRecordAsArrayBehavior
* @method CActiveRecord getOwner()
*/
class EActiveRecordAsArrayBehavior extends CActiveRecordBehavior
{
/**
@JiLiZART
JiLiZART / index.html
Created May 20, 2013 15:13
A CodePen by David HC.
<div class='button'>
<div class='iphone'><div class='knob'></div></div><center><span>Available on the <h2>App Store</h2></span></center>
</div>
<h1 class='price'>$9.00</h1>
<link href='http://fonts.googleapis.com/css?family=Open+Sans:400,700' rel='stylesheet' type='text/css'>
@JiLiZART
JiLiZART / jquery.filter.expr.md
Created May 13, 2013 18:51
jQuery Contains Expression, checks if element contain a value

Code

  jQuery.expr[':'].contains = function(a,i,m){
      return (a.textContent || a.innerText || "").toUpperCase().indexOf(m[3].toUpperCase())>=0;
  };
  

Usage

@JiLiZART
JiLiZART / script query extract.md
Created May 8, 2013 10:52
Extracty query from included js script
<script src="js/somefile.js?option=1,option2,option3"></script>
query = document.getElementsByTagName("script");
query = query[query.length - 1].src;
if (- 1 == query.indexOf("?")) query += "?";