Skip to content

Instantly share code, notes, and snippets.

View keybase.md

Keybase proof

I hereby claim:

  • I am maadhattah on github.
  • I am jamesdigioia (https://keybase.io/jamesdigioia) on keybase.
  • I have a public key ASCG7vUNizwEP8YhbG9NQtJtNt4kMip4Rd6XMrkUoUgeDgo

To claim this, I am signing this object:

View index.html
<!DOCTYPE html>
<html>
<head>
<title>Page Title</title>
</head>
<body>
<button id="up">Up</button>
<button id="down">Down</button>
<button id="left">Left</button>
<button id="right">Right</button>
View index.html
<!DOCTYPE html>
<html>
<head>
<title>jQuery Fun House Starter Code</title>
</head>
<body>
<div class="section" id="gallery">
<h1>Pictures of elephants</h1>
<img class="gallery-thumb" id="pic1" src="https://upload.wikimedia.org/wikipedia/commons/f/f9/Loxodonta_africana_-_old_bull_(Ngorongoro,_2009).jpg">
<img class="gallery-thumb" id="pic2" src="https://upload.wikimedia.org/wikipedia/commons/6/63/African_elephant_warning_raised_trunk.jpg">
View index.html
<!DOCTYPE html>
<html>
<head>
<title>Movies and Shows</title>
</head>
<body>
<h1>Amazing Movies and TV Shows Ever!</h1>
<ol>
<li>Finding Dory</li>
<li>Game of Thrones</li>
@mAAdhaTTah
mAAdhaTTah / add-redirect-args.php
Created Nov 19, 2015
Using Redirect Args to Display Errors
View add-redirect-args.php
if ($error) {
    add_filter('redirect_post_location', function( $location ) use ( $error ) {
        return add_query_arg( 'my-plugin-error', $error->get_error_message(), $location );
    });
}
@mAAdhaTTah
mAAdhaTTah / admin-notice-hook.php
Created Nov 19, 2015
save_post Error Reporting Boilerplate
View admin-notice-hook.php
add_action( 'admin_notices', 'my_error_messages' );
@mAAdhaTTah
mAAdhaTTah / provision-osx.sh
Last active Jun 6, 2016
OS X Provisioning Script
View provision-osx.sh
gem install kitchenplan
kitchenplan setup
kitchenplan provision
gem install homesick
homesick clone https://github.com/mAAdhaTTah/dotfiles
homesick link dotfiles
git clone pianosa:~/.settings/ # The address is for my home server
mackup restore
@mAAdhaTTah
mAAdhaTTah / fb-debugger.php
Created Sep 27, 2015
Facebook Post Debugger
View fb-debugger.php
<?php
/*
Plugin Name: Facebook Post Debugger
Version: 0.1
Plugin URI: http://jamesdigioia.com/
Description: This plugin runs the bit.ly shortlink through the Facebook debugger upon publishing.
Author: James DiGioia
Author URI: http://www.jamesdigioia.com/
*/
@mAAdhaTTah
mAAdhaTTah / improved-boot.php
Last active Mar 23, 2021
A Better WordPress Singleton
View improved-boot.php
call_user_func(array(new PluginClass(__FILE__), 'boot'));
View test
var http = require('http');
var _ = require('lodash');
// An HTTP server for an quick EventEmitter example. Works just like a socket.
var server = http.createServer(function(req, res) {
console.log('Reqest incoming...');
});
// This will not cause an error since partial is invoked after socket gets passed into the function.
server.on('connection', function(socket) {