Skip to content

Instantly share code, notes, and snippets.

View ahmadawais's full-sized avatar
Building the LLM computing primitive at Langbase.com

Ahmad Awais ⌘ ahmadawais

Building the LLM computing primitive at Langbase.com
View GitHub Profile
@ahmadawais
ahmadawais / Flat-Social-Icons-(pure-CSS).markdown
Created November 29, 2014 04:30
Flat Social Icons (pure CSS)

Flat Social Icons (pure CSS)

Pure CSS social icons (no images), written in SCSS and uses the BEM Methodology for the naming conventions in the HTML and CSS.

14/10/14; Updated to add hover states.

15/10/14; Updated how the buttons vertically center the icon.

20/10/14; Modified the code so only one list and loop is needed.

@ahmadawais
ahmadawais / _variables.scss
Last active August 29, 2015 14:11
Partial SCSS colors variables
/* ----------------------------------------------------------------------------
* Color variables
*
* @pacakge PP
* since 1.2.1
*
* $wh variants 20% on hover , 50% footer
* $bl variants 20% on text and footer bg, 50% on small footer bg
*
<div class="form-horizontal">
<div class="form-group"><label class="control-label col-md-3">Full Name</label><div class="col-md-9">[text* your-name class:form-control]</div></div>
<div class="form-group"><label class="control-label col-md-3">Email Address</label><div class="col-md-9">[email* your-email class:form-control]</div></div>
<div class="form-group"><label class="control-label col-md-3">Subject</label><div class="col-md-9">[text your-subject class:form-control]</div></div>
<div class="form-group"><label class="control-label col-md-3">Message</label><div class="col-md-9">[textarea your-message x5 class:form-control]</div></div>
<div class="form-group"><div class="col-md-offset-3 col-md-9">[submit class:btn class:btn-primary "Send"]</div></div>
</div>
@ahmadawais
ahmadawais / _header.scss
Created January 1, 2015 08:56
WP Menu Design
/* ----------------------------------------------------------------------------
* aa_nav
*
* Tabs object.
*
* 1. Tables (kinda) for layout!
* 2. This is the magic bit; make all children occupy equal width.
* 3. Required to make the tabs fill their container.
* 4. Make each tab pack up horizontally.
@ahmadawais
ahmadawais / gist:9f45a91e43b36127ac9b
Created January 5, 2015 13:38
Check the path of SVN
which svn
@ahmadawais
ahmadawais / name_widget.php
Created January 9, 2015 10:00
WordPress Widget Boilerplate
<?php
/*
Plugin Name: WP Widget
Plugin URI: http://AhmadAwais.com
Description: This is a widget boilerplate.
Version: 1.0
Author: Ahmad Awais
Author URI: http://AhmadAwais.com
*/
// If this file is called directly, abort.
@ahmadawais
ahmadawais / functions.php
Last active July 29, 2018 13:17
SEO by Yoast Stuff
/**
* Filter Yoast SEO Metabox Priority to low
*/
add_filter( 'wpseo_metabox_prio', 'aa_filter_yoast_seo_metabox' );
function aa_filter_yoast_seo_metabox() {
return 'low';
}
/**
* Remove Yoast SEO Metabox
@ahmadawais
ahmadawais / plugin.php
Created January 22, 2015 11:06
Quit if plugin file is called directly.
// If this file is called directly, abort.
if(!defined('WPINC')){die;}
@ahmadawais
ahmadawais / WP_Plugin.php
Created January 22, 2015 11:06
Load Redux in a plugin
/**
Load the embedded Redux Framework
**/
if (file_exists(dirname(__FILE__).'/admin/admin-init.php')) {
require_once( dirname(__FILE__).'/admin/admin-init.php' );
}
@ahmadawais
ahmadawais / WP_Plugin.php
Created January 22, 2015 11:09
Require a PHP file in WordPress plugin.
/**
*
* Require a PHP file in WordPress
*
*/
if (file_exists(dirname(__FILE__).'/admin/aa_scripts.php')) {
require_once( dirname(__FILE__).'/admin/aa_scripts.php' );
}