Skip to content

Instantly share code, notes, and snippets.

View yunusga's full-sized avatar
👋
Hello World!

Yunus Gaziyev yunusga

👋
Hello World!
View GitHub Profile
@yunusga
yunusga / b-grid.styl
Created November 7, 2016 06:47
CSS сетка на stylus
gridColumns = 12
gridGutter = 15px
gridClass = 'b-grid'
gridClassList = 'list'
gridClassItem = 'item'
// размер элементов сетки
getGridBasis(size)
max-width floor((100/size) * 1%, 2)
flex-basis floor((100/size) * 1%, 2)
@yunusga
yunusga / beml-block.sublime-snippet
Last active March 30, 2017 12:14
Sublime, Atom snippets for BEML
<snippet>
<content><![CDATA[
<${1:div} block="${2:block}" mod="${3:mod}">${4:content}</${1:div}><!-- b:${2:block} -->
]]></content>
<tabTrigger>block</tabTrigger>
</snippet>
@yunusga
yunusga / command.md
Created September 17, 2015 07:22
HOW TO get back to stock when your phone stuck in fastboot mode

download http://downloads.codefi.re/autoprime/LG/LG_G2

! ! ! NOTICE! The following is the method of repairing DOWNLOAD MODE:

1 get your phone into fastboot mode, connect to the computer with usb, wait for it automatically installing the driver 2 extract the 7Z file I provided into a ROOT drive,for example D: 3 Open CMD, input

fastboot erase recovery
@yunusga
yunusga / defer.js
Last active July 28, 2017 06:36
Wait Until jQuery Loads
function defer(callback) {
if (window.jQuery) {
callback();
} else {
setTimeout(function() {
defer(callback)
}, 100);
}
}
@yunusga
yunusga / BEML.xml
Last active August 26, 2015 18:56
JetBrains IDE Live templates for BEML
<templateSet group="BEML">
<template name="block" value="&lt;!-- [+] $BLOCK$ --&gt;&#10;&lt;$TAG$ block=&quot;$BLOCK$&quot;&gt;&#10; $CONTENT$&#10;&lt;/$TAG$&gt;&#10;&lt;!-- [-] $BLOCK$ --&gt;" description="БЭМL блок" toReformat="true" toShortenFQNames="true">
<variable name="TAG" expression="" defaultValue="&quot;div&quot;" alwaysStopAt="true" />
<variable name="BLOCK" expression="" defaultValue="" alwaysStopAt="true" />
<variable name="CONTENT" expression="" defaultValue="" alwaysStopAt="true" />
<context>
<option name="HTML_TEXT" value="true" />
<option name="HTML" value="true" />
</context>
</template>
@yunusga
yunusga / nvidia-prime-ubuntu.md
Last active August 29, 2015 14:26
fix for steam launch ubuntu 15.04 x64, nvidia-prime

doh, since you mentioned ldconfig looking for mesa libs before nvidia i checked out my /etc/ld.so.conf.d/ and found, it's my fault:

i had a conf file named steam.conf with

/usr/lib32
/usr/lib/i386-linux-gnu/mesa
/usr/lib/i386-linux-gnu/dri
/usr/lib/i386-linux-gnu/gallium-pipe
@yunusga
yunusga / firsLastIndentReset.md
Last active August 29, 2015 14:26
Приведение `свойства-top` у первого потомка и `свойства-bottom` у последнего потомка к `0`

Применение:

@include firsLastIndentReset($elem, $prop);

$elem - элемент DOM (класс или тег) для класса заключаем селлектор в кавычки '.item'

$prop - CSS свойство имеющее модификаторы top и bottom

Вызов без параметров

{
"bold_folder_labels": true,
"color_scheme": "Packages/Theme - Spacegray/base16-ocean.dark.tmTheme",
"default_encoding": "UTF-8",
"draw_centered": false,
"ensure_newline_at_eof_on_save": true,
"fade_fold_buttons": false,
"folder_exclude_patterns":
[
".svn",
@yunusga
yunusga / wordpress_smtp.php
Last active December 16, 2016 09:29
Wordpress SMTP support if php mail() not work
<?php
// для примера, настройки Яндекса
add_action('phpmailer_init','send_smtp_email');
function send_smtp_email( $phpmailer ) {
// Define that we are sending with SMTP
$phpmailer->isSMTP();
// The hostname of the mail server
$phpmailer->Host = "smtp.yandex.ru";
@yunusga
yunusga / serialize_object.js
Created September 18, 2014 07:23
Serialize Form to JSON
$.fn.serializeObject = function()
{
var o = {};
var a = this.serializeArray();
$.each(a, function() {
if (o[this.name]) {
if (!o[this.name].push) {
o[this.name] = [o[this.name]];
}
o[this.name].push(this.value || '');