Skip to content

Instantly share code, notes, and snippets.

View ahmadawais's full-sized avatar
Building the easiest way for developers to build AI products BaseAI.dev

Ahmad Awais ⌘ ahmadawais

Building the easiest way for developers to build AI products BaseAI.dev
View GitHub Profile
@ahmadawais
ahmadawais / like-actions.js
Created June 8, 2016 15:45 — forked from lukecav/like-actions.js
Simple Likes
jQuery( document ).ready( function ( $ ) {
$( document ).on( 'click', '.simple-like-btn', function( e ) {
e.preventDefault();
var like = {
'action' : $( this ).data( 'action' ),
'pid' : $( this ).data( 'pid' )
}
var likebtn = this;
$.post( ajax_object.ajax_url, like ).done( function( response ) {
response = JSON.parse( response );
@ahmadawais
ahmadawais / filters-in-the-wp-rest-api-v2
Created June 27, 2016 14:56 — forked from BraadMartin/filters-in-the-wp-rest-api-v2
A list of all of the filters available in the WP REST API v2
rest_avatar_sizes
rest_prepare_attachment
rest_pre_insert_comment
rest_comment_type_trashable
comment_text
@ahmadawais
ahmadawais / github-brand-colors-aug-2015.css
Created June 28, 2016 03:06 — forked from christopheranderton/github-brand-colors-aug-2015.css
Official Github Brand Colors (August 20, 2015) from the GitHub internal CSS framework (Primer) version 2.3.3 at: http://primercss.io/colors/
/* # OFFICIAL GITHUB BRAND COLORS
--------------------------------------------------------------------
Official Github Brand Colors (August 20, 2015) from the
GitHub internal CSS framework (Primer) version 2.3.3
Source URI: http://primercss.io/colors/
1.a = Github Branding Color Swatches
-------------------------------------------------------------------- */
.swatch-github-blue {
background-color:#4078c0;
@ahmadawais
ahmadawais / zsh.md
Created July 3, 2016 22:47 — forked from tsabat/zsh.md
Getting oh-my-zsh to work in Ubuntu
@ahmadawais
ahmadawais / .set-defaults.sh
Created August 13, 2016 12:34
Set Defaults for OS X DOT files (download to root, rename as '.set-defaults' and then type 'source .set-defaults' fro Terminal)
# Sets reasonable OS X defaults.
# Starting point was: https://github.com/holman/dotfiles/blob/master/osx/set-defaults.sh
#
#
#
# BF says: Download this file to root, rename as '.set-defaults' (e.g. remove the file extension) and then type 'source .set-defaults' from Terminal. Once done, restart and your golden.
# Disable the sound effects on boot
sudo nvram SystemAudioVolume=%00
@ahmadawais
ahmadawais / wp-config-debug.php
Created September 9, 2016 22:46 — forked from jrfnl/wp-config-debug.php
Code to add to wp-config.php to enhance information available for debugging.
<?php
/**
* == About this Gist ==
*
* Code to add to wp-config.php to enhance information available for debugging.
*
* You would typically add this code below the database, language and salt settings
*
* Oh.. and *do* make sure you change the path to the log file to a proper file path on your server (make sure it exists).
*
@ahmadawais
ahmadawais / post.php
Created October 18, 2016 04:48 — forked from itzikbenh/post.php
Twitter share on text highlight. Inspired by theguardian.com. Tested on latest Chrome, Firefox, and Safari.
<!-- Add this anywhere in the page. It assumes your content is inside an <article> tag. -->
<a class="floating-twitter-share-link" href="#" title="Share this" target="_blank">
<i class="fa fa-twitter floating-twitter-share"></i>
</a>
@ahmadawais
ahmadawais / README.md
Created March 17, 2017 03:03 — forked from joyrexus/README.md
Vanilla JS equivalents of jQuery methods

Sans jQuery

Events

// jQuery
$(document).ready(function() {
  // code
})
@ahmadawais
ahmadawais / signup.html
Created March 20, 2017 09:25 — forked from christiangenco/signup.html
Bootstrap ajax email signup form for sendy.co
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<script type="text/javascript" src="http://code.jquery.com/jquery-2.1.4.min.js" ></script>
<title>AJAX Signup</title>
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.4/css/bootstrap.min.css">
<!-- Optional theme -->
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.4/css/bootstrap-theme.min.css">
@ahmadawais
ahmadawais / gist:ff1747273a456aa55c57fa6adb55f52b
Created March 23, 2017 10:50 — forked from yhara/gist:1408888
GitHub Emoji (sort by category)
emotion :+1: :-1: :clap: :heart: :sparkles: :v: :zzz:
icon :new: :ok: :cool: :vs: :tm: :warning: :wheelchair: :zap: :art: :bomb: :bulb: :key: :lock: :memo: :mag:
item :book: :gift: :moneybag: :mega: :scissors: :hammer:
device :computer: :iphone: :calling: :email:
human :cop: :runner: :feet: :fist: :punch: :lipstick: :tophat:
food :beer: :cake: :smoking:
behicle :airplane: :bike: :bus: :ski: :taxi: :train:
animal :bear: :fish: :octocat:
nature :fire: :leaves: :star: :sunny: