Skip to content

Instantly share code, notes, and snippets.

View myasseen's full-sized avatar

Mahmoud Yasseen myasseen

View GitHub Profile
// Helper classes.
@each $property in (border, margin, padding) {
@each $direction in ('', -left, -right, -top, -bottom) {
.#{$property}#{$direction} {
@if $property == border {
#{$property}#{$direction}: 1px solid $gray-lighter;
}
@else {
#{$property}#{$direction}: 1em;
}
@myasseen
myasseen / bootstrap-masonry-template.htm
Created July 28, 2016 14:46 — forked from justincarroll/bootstrap-masonry-template.htm
This is my template for using Masonry 3 with Bootstrap 3. For those of you who follow this gist a lot has changed since Bootstrap 2.
<!DOCTYPE HTML>
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Bootstrap Masonry Template</title>
<link rel="stylesheet" href="http://maxcdn.bootstrapcdn.com/bootstrap/3.2.0/css/bootstrap.min.css">
<link rel="stylesheet" href="style.css">
<link rel="stylesheet" href="http://fonts.googleapis.com/css?family=PT+Sans+Caption:400,700">
@myasseen
myasseen / wp_mail_smtp.php
Created March 4, 2016 15:35 — forked from butlerblog/wp_config.php
Configure WordPress wp_mail function to send through SMTP server http://b.utler.co/Y3
/**
* This function will connect wp_mail to your authenticated
* SMTP server. This improves reliability of wp_mail, and
* avoids many potential problems.
*
* Author: Chad Butler
* Author URI: http://butlerblog.com
*
* For more information and instructions, see:
* http://b.utler.co/Y3
/**
*
* Gulpfile setup
*
* @since 1.0.0
* @authors Ahmad Awais, @digisavvy, @desaiuditd, @jb510, @dmassiani and @Maxlopez
* @package neat
* @forks _s & some-like-it-neat
*/
@myasseen
myasseen / SassMeister-input-HTML.html
Last active October 24, 2016 07:37
Generated by SassMeister.com.
<div class="container">
<h3>Items</h3>
<ul class="items">
<li><div class="panel">item 1</div></li>
<li><div class="panel">item 2 long (Lorem ipsum dolor sit amet, consectetur adipisicing elit. Laudantium?)</div></li>
<li><div class="panel">item 3</div></li>
<li><div class="panel">item 4</div></li>
<li><div class="panel">item 5</div></li>
<li><div class="panel">item 6</div></li>
</ul>
@myasseen
myasseen / SassMeister-input-HTML.html
Created February 16, 2016 08:28
Generated by SassMeister.com.
<section class="tariffs">
<div class="container">
<div class="row">
<div class="h2 text-center">Top tariffs</div>
<div class="tariff alfa col-xs-12 col-sm-4 col-sm-push-4">
<div class="panel panel-default">
<div class="h3">Alfa</div>
<div class="price">
<div class="first">
<span>$169</span> per first page
@myasseen
myasseen / test.php
Created February 2, 2016 22:49 — forked from madan712/test.php
PHP example - Google Recaptcha validation using jquery (AJAX)
<?php
$remoteip = $_SERVER['REMOTE_ADDR'];
?>
<!doctype html>
<html>
<head>
<title> Recaptcha validation using jquery ajax </title>
<script src="http://code.jquery.com/jquery-1.9.1.js"></script>
<script type="text/javascript" src="recaptcha_ajax.js"></script>
<script type="text/javascript">
@myasseen
myasseen / jquery.validate.bootstrap.js
Created February 1, 2016 08:41
jQuery validation & integration with Bootstrap
// Set jQuery.validate settings for bootstrap integration
jQuery.validator.setDefaults({
highlight: function(element) {
jQuery(element).closest('.form-group').addClass('has-error');
},
unhighlight: function(element) {
jQuery(element).closest('.form-group').removeClass('has-error');
},
errorElement: 'span',
errorClass: 'label label-danger',
@myasseen
myasseen / maybe-include-plugin.php
Created January 18, 2016 13:04 — forked from alexkingorg/maybe-include-plugin.php
Conditional loading of a plugin within a WordPress theme.
<?php
// Run this code on 'after_theme_setup', when plugins have already been loaded.
add_action('after_setup_theme', 'my_load_plugin');
// This function loads the plugin.
function my_load_plugin() {
// Check to see if your plugin has already been loaded. This can be done in several
// ways - here are a few examples: