Skip to content

Instantly share code, notes, and snippets.

View chyngyz's full-sized avatar

Chyngyz Arystan chyngyz

View GitHub Profile
'use strict';
var gulp = require('gulp');
var notify = require("gulp-notify");
var Path = {
rootDir: 'staticfiles/dev',
rootDist: 'staticfiles/dist',
staticJs: 'staticfiles/dev/js',
staticCSS: 'staticfiles/dev/styles',
"devDependencies": {
"gulp": "^3.9.0",
"gulp-autoprefixer": "^3.0.2",
"gulp-cache": "^0.3.0",
"gulp-clean": "^0.3.1",
"gulp-concat": "^2.6.0",
"gulp-csso": "^1.0.0",
"gulp-filter": "^3.0.1",
"gulp-gzip": "^1.2.0",
"gulp-imagemin": "^2.3.0",

Keybase proof

I hereby claim:

  • I am chyngyz on github.
  • I am chyngyz (https://keybase.io/chyngyz) on keybase.
  • I have a public key whose fingerprint is AED1 ED0A B4CA 866E AC07 2AD7 16C6 FFAE 7EAE C8D8

To claim this, I am signing this object:

var BrowserDetect = {
init: function () {
this.browser = this.searchString(this.dataBrowser) || "Other";
this.version = this.searchVersion(navigator.userAgent) || this.searchVersion(navigator.appVersion) || "Unknown";
},
searchString: function (data) {
for (var i = 0; i < data.length; i++) {
var dataString = data[i].string;
this.versionSearchString = data[i].subString;
@chyngyz
chyngyz / webpack.prod.config.js
Created May 29, 2016 09:03
Angular + Webpack Production Config
'use strict';
var webpack = require('webpack');
var CopyWebpackPlugin = require('copy-webpack-plugin');
var ExtractTextPlugin = require('extract-text-webpack-plugin');
var HtmlWebpackPlugin = require('html-webpack-plugin');
module.exports = {
context: __dirname + '/src',
@chyngyz
chyngyz / style.css
Created June 28, 2016 07:10
Text Decoration Underline Hack
a {
text-shadow: 0.04545em 0 0 #fff,0.09091em 0 0 #fff,0.13636em 0 0 #fff,-0.04545em 0 0 #fff,-0.09091em 0 0 #fff,-0.13636em 0 0 #fff,0 0.04545em 0 #fff,0 0.09091em 0 #fff,0 -0.04545em 0 #fff,0 -0.09091em 0 #fff;
background-image: -webkit-linear-gradient(gray, gray);
background-image: -moz-linear-gradient(gray, gray);
background-image: -ms-linear-gradient(gray, gray);
background-image: linear-gradient(gray, gray);
background-position: 0 1em;
background-size: 1px 1px;
background-repeat: repeat-x;
<!DOCTYPE html>
<head>
<meta name="ydWidgetData" id="b2340f0afdb2a3f87db13fdcc95d6e15" content="" data-sender_id="1063" data-weight="3" data-cost="0" data-height="20" data-length="60" data-width="60" data-city_from="Москва" data-css_name="geo_tpl" data-tpl_name="geo_tpl" data-container_tag_id="e26f8338e11b809b3164b8b7ac2d9d6"
data-resource_id="2212" data-resource_key="56af5968d828f2f2f99424afebdac95a" data-tracking_method_key="ecdcf61349490fc80d31c9b8935a4ee6" data-autocomplete_method_key="0dbe6e447d0a828395b241e4a14527e0"></meta>
<!--[if lt IE 9]><script>document.createElement("msw");</script><![endif]-->
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.0/jquery.min.js"></script>
<script src="https://delivery.yandex.ru/widget/widgetJsLoader?dataTagID=b2340f0afdb2a3f87db13fdcc95d6e15" charset="utf-8"></script>
<script type="text/javascript">
@chyngyz
chyngyz / formatMoney.js
Created July 20, 2016 05:16
Format Money Script
Number.prototype.formatMoney = function(c, d, t){
var n = this,
c = isNaN(c = Math.abs(c)) ? 2 : c,
d = d == undefined ? "." : d,
t = t == undefined ? "," : t,
s = n < 0 ? "-" : "",
i = parseInt(n = Math.abs(+n || 0).toFixed(c)) + "",
j = (j = i.length) > 3 ? j % 3 : 0;
return s + (j ? i.substr(0, j) + t : "") + i.substr(j).replace(/(\d{3})(?=\d)/g, "$1" + t) + (c ? d + Math.abs(n - i).toFixed(c).slice(2) : "");
};
@chyngyz
chyngyz / home.php
Created November 28, 2016 18:02
Wordpress Query by category slug
<?php
$args = array(
'category_name' => 'slider'
);
$loop = new WP_Query( $args );
if ( $loop->have_posts() ) : ?>
<div id="vgslider" class="vg__slider-wrap owl-carousel owl-theme">

Keybase proof

I hereby claim:

  • I am chyngyz on github.
  • I am chyngyz (https://keybase.io/chyngyz) on keybase.
  • I have a public key whose fingerprint is 3091 4033 A319 0BED 5AA6 16D9 8EF4 CD1B 6C78 D86F

To claim this, I am signing this object: