Skip to content

Instantly share code, notes, and snippets.

View apisandipas's full-sized avatar

Bryan Paronto apisandipas

View GitHub Profile
@apisandipas
apisandipas / heyify.jquery.js
Created September 19, 2014 16:54
Most Basic Anatomy of a JQuery Plugin
;(function( $, window, document, undefined){
$.fn.heyify = function(options){
// no elems queried, lets bail
if (!this.length) { return this; }
// Default settings
var defaults = {
msg: 'Hey Bryan'
};

Drink n Dev Hackathon

http://bit.ly/1vVlxbE

welcome to Doejo!

your hosts are Keanan and Bryan

Food

Lunch = Potbelly's, dinner = Dimo's

@apisandipas
apisandipas / Gulpfile.js
Created October 21, 2014 17:04
Simple Gulp Setup for SCSS and livereload
var gulp = require('gulp'),
$ = require('gulp-load-plugins')();
var config = {
scss_src: 'assets/scss/**/*.scss',
css_dest: 'assets/css'
};
gulp.task('css', function() {
gulp.src( config.scss_src )
/**
* Dump and die
*
* @param $msg - optional (string) - text output
* @param $data - required (Object or Array)
*/
function dd($data, $kill = true){
if (is_array($data)){
echo "<pre>"; print_r($data); echo "</pre>";
$kill ? exit() : '';
@apisandipas
apisandipas / jquery.equalheights.js
Created December 4, 2014 21:54
Equal heights plugin
/**
* Equal Heights Plugin
* Equalize the heights of elements. Great for columns or any elements
* that need to be the same size (floats, etc).
*
* Version 1.0
* Updated 12/10/2008
*
* Copyright (c) 2008 Rob Glazebrook (cssnewbie.com)
*
var gulp = require('gulp'),
$ = require('gulp-load-plugins')();
var config = {
css: {
src: 'assets/scss/**/*.scss',
dest: 'assets/css'
},
js: {
script_src: 'assets/js/script.js',
# Created by https://www.gitignore.io
### SCSS ###
.sass*
### Node ###
# Logs
logs
*.log
add_action(“manage_(your custom post type)_custom_column”, “my_custom_columns”);
add_filter(“manage_edit-(your custom post type)_columns”, “my_page_columns”);
@apisandipas
apisandipas / bp_dynamic_rows
Created January 13, 2015 15:39
Dynamic html rows for the Loop
/**
* When Looping over a collection of posts, this will configure and out put the row seperator in the correct place.
*
* Must be used within the Loop
*
* @param integer $numCols the number of columns in each row iteration
* @param string $rowSeperator the html output to seperate the rows, defaults to: </div><div class='row'>
* @return string
*/
function bp_dynamic_rows( $numCols = 2, $rowSeperator = "</div><div class='row'>" ){
@apisandipas
apisandipas / gist:6ab14d73447cda4e8f3a
Last active August 29, 2015 14:14
Making a POST Request with submitted form data in WordPress
<?php
add_action('wpcf7_mail_sent', 'send_to_pipedrive', 1);
/**
* [send_to_pipedrive description]
* @param [Object] $cfdata Submitted Form Data
* @return [type] [description]
*/
function send_to_pipedrive( $cfdata ){
$url = "http://....";/// API Endpoint...