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
<!DOCTYPE html>
<html lang="en-US">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<meta name="robots" content="noodp, noydir" />
<link rel="dns-prefetch" href="//cdnjs.cloudflare.com">
<link rel="canonical" href="http://mysite.com/" />
<link rel="stylesheet" href="http://mysite.com/style.css" type="text/css" />
<!doctype html>
<html>
<head>
<!-- Run in full-screen mode. -->
<meta name="apple-mobile-web-app-capable" content="yes">
<!-- Make the status bar black with white text. -->
<meta name="apple-mobile-web-app-status-bar-style" content="black">
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<meta content="maximum-scale=1,minimum-scale=1,width=device-width" name="viewport">
<style>
body {
margin: 0;
@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 || '');
@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";
{
"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 / firsLastIndentReset.md
Last active August 29, 2015 14:26
Приведение `свойства-top` у первого потомка и `свойства-bottom` у последнего потомка к `0`

Применение:

@include firsLastIndentReset($elem, $prop);

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

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

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

@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 / 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 / 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);
}
}