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 / criticalcss-bookmarklet-devtool-snippet.js
Created January 24, 2016 11:55 — forked from PaulKinlan/criticalcss-bookmarklet-devtool-snippet.js
CriticalCSS Bookmarklet and Devtool Snippet.js
(function() {
var CSSCriticalPath = function(w, d, opts) {
var opt = opts || {};
var css = {};
var pushCSS = function(r) {
if(!!css[r.selectorText] === false) css[r.selectorText] = {};
var styles = r.style.cssText.split(/;(?![A-Za-z0-9])/);
for(var i = 0; i < styles.length; i++) {
if(!!styles[i] === false) continue;
var pair = styles[i].split(": ");
@ahmadawais
ahmadawais / wp-admin-menu-reorder.php
Created January 12, 2016 09:46 — forked from raideus/wp-admin-menu-reorder.php
Re-order WordPress Admin menu items
<?php
/**
* Re-orders tabs in the WordPress Admin menu. Include this in the functions.php file of your theme.
*/
function gs_custom_menu_order($menu_ord) {
if (!$menu_ord) return true;
return array(
'index.php',
use v5.12;
use warnings;
use utf8;
my $uname = 'theory';
my ($curr_month, $curr_year) = (gmtime)[4,5];
$curr_year += 1900;
$curr_month += 1;
my %projects;
for my $year (2012..$curr_year) {
@ahmadawais
ahmadawais / osx-10.11-setup.md
Created December 28, 2015 05:25 — forked from kevinelliott/osx-10.11-setup.md
Mac OS X 10.11 El Capitan Setup

Mac OS X 10.11 El Capitan

Custom recipe to get OS X 10.11 El Capitan running from scratch, setup applications and developer environment. This is very similar (and currently mostly the same) as my 10.10 Yosemite setup recipe (as found on this gist https://gist.github.com/kevinelliott/0726211d17020a6abc1f). Note that I expect this to change significantly as I install El Capitan several times.

I use this gist to keep track of the important software and steps required to have a functioning system after a semi-annual fresh install. On average, I reinstall each computer from scratch every 6 months, and I do not perform upgrades between distros.

This keeps the system performing at top speeds, clean of trojans, spyware, and ensures that I maintain good organizational practices for my content and backups. I highly recommend this.

You are encouraged to fork this and modify it to your heart's content to match your own needs.

@ahmadawais
ahmadawais / Sublime-stuffs.txt
Created December 24, 2015 12:08 — forked from vishalbasnet23/Sublime-stuffs.txt
Install PHPCS with WordPress Coding Standard with Sublime Text 3
1. cmd+shift+p
2. Type phpcs and install it
3. Preferences > Package Settings > Php Code Sniffer > User settings
@ahmadawais
ahmadawais / gist:ebfe684a1f1140490992
Created October 20, 2015 17:14 — forked from stuart11n/gist:9628955
rename git branch locally and remotely
git branch -m old_branch new_branch # Rename branch locally
git push origin :old_branch # Delete the old branch
git push --set-upstream origin new_branch # Push the new branch, set local branch to track the new remote
@ahmadawais
ahmadawais / hacks.md
Created October 11, 2015 15:08 — forked from rosswd/hacks.md
HTML, JS, DOM, CSS Hacks
<?
/////////////////////
// slack2html
// by @levelsio
/////////////////////
//
/////////////////////
// WHAT DOES THIS DO?
/////////////////////
//
@ahmadawais
ahmadawais / osx-10.10-setup.md
Created September 23, 2015 17:31 — forked from kevinelliott/osx-10.10-setup.md
Mac OS X 10.10 Yosemite Setup

Mac OS X 10.10 Yosemite

Custom recipe to get OS X 10.10 Yosemite running from scratch, setup applications and developer environment. I use this gist to keep track of the important software and steps required to have a functioning system after a semi-annual fresh install. On average, I reinstall each computer from scratch every 6 months, and I do not perform upgrades between distros.

This keeps the system performing at top speeds, clean of trojans, spyware, and ensures that I maintain good organizational practices for my content and backups. I highly recommend this.

You are encouraged to fork this and modify it to your heart's content to match your own needs.

Install Software

@ahmadawais
ahmadawais / .scrutinizer.yml
Last active September 22, 2015 06:11 — forked from pixline/.scrutinizer.yml
sample scrutinizer.yml config file for WordPress plugin
filter:
paths:
- 'lib/*'
- '/*'
excluded_paths:
- 'tests/*'
- 'examples/*'
tools:
php_mess_detector:
filter: