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
class EDD_Paddle_Webhook_Handler extends EDD_Webhook_Handler {
function get_hook_id() {
return 'paddle';
}
function get_hook_name() {
return 'Paddle';
}
function get_endpoint_args() {
@ahmadawais
ahmadawais / upload-a-file.MD
Created June 18, 2017 11:07 — forked from websupporter/upload-a-file.MD
Upload a file using the WordPress REST API

Upload files

Using the REST API to upload a file to WordPress is quite simple. All you need is to send the file in a POST-Request to the wp/v2/media route.

There are two ways of sending a file. The first method simply sends the file in the body of the request. The following PHP script shows the basic principle:

@ahmadawais
ahmadawais / curl.md
Created March 29, 2017 04:03 — forked from btoone/curl.md
A curl tutorial using GitHub's API

Introduction

An introduction to curl using GitHub's API.

The Basics

Makes a basic GET request to the specifed URI

curl https://api.github.com/users/caspyin
@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:
@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 / 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 / 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 / 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 / .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 / zsh.md
Created July 3, 2016 22:47 — forked from tsabat/zsh.md
Getting oh-my-zsh to work in Ubuntu