Skip to content

Instantly share code, notes, and snippets.

View TimNZ's full-sized avatar

Tim Shnaider TimNZ

View GitHub Profile
@wrilben
wrilben / eventsAggregator.php
Last active August 12, 2019 01:12
Aggregate Events from Facebook, Eventbrite, Meetup and other platforms using a geo-location
<?php
// Generate geo location using Ip Address
$user_ip = 'getenv('REMOTE_ADDR')';
$geo = unserialize(file_get_contents("http://www.geoplugin.net/php.gp?ip=$user_ip"));
$country = $geo["geoplugin_countryName"];
$city = $geo["geoplugin_city"];
$lgn = $geo['geoplugin_longitude'];
$lat = $geo['geoplugin_latitude'];
@Yimiprod
Yimiprod / difference.js
Last active April 5, 2024 13:17
Deep diff between two object, using lodash
/**
* This code is licensed under the terms of the MIT license
*
* Deep diff between two object, using lodash
* @param {Object} object Object compared
* @param {Object} base Object to compare with
* @return {Object} Return a new object who represent the diff
*/
function difference(object, base) {
function changes(object, base) {
@kennwhite
kennwhite / rds_vpc_pg_multi-zone_launch.yml
Last active December 23, 2020 00:19
Ansible Playbook: Create multi-zone Postgres on RDS in a VPC
# Ansible RDS Multi-AZ Postgres
#
# Assumes existing Security Group, VPC, and RDS Subnet Groups.
#
# To install Ansible on OSX:
# sudo easy_install pip
# sudo pip install paramiko PyYAML jinja2 (might be prompted to install XCode & re-run)
# sudo pip install ansible
# sudo pip install boto
# sudo mkdir /etc/ansible
@wturnerharris
wturnerharris / gateway-braintree.php
Created November 13, 2013 04:02
BrainTree extensions for Events Manager Pro Requires Braintree PHP libraries available via composer or direct download: https://www.braintreepayments.com/assets/client_libraries/php/braintree-php-2.23.1.tar.gz
<?php
if ( class_exists('EM_Gateway') ) :
class BraintreeGateway extends EM_Gateway {
var $gateway = 'braintree';
var $title = 'BrainTree';
var $status = 4;
var $status_txt = 'Processing (BrainTree)';
var $button_enabled = false;
var $supports_multiple_bookings = true;
@aaronksaunders
aaronksaunders / index.html
Created May 14, 2013 02:50
SampleKinveyApp Application using AngularJS and Kinvey
<!doctype html>
<html ng-app="sampleKinveyApp">
<head>
<meta charset="utf-8">
<title>Bootstrap, from Twitter</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="description" content="">
<meta name="author" content="">
<!-- Le styles -->
@mxriverlynn
mxriverlynn / marionette.gauntlet.js
Last active September 25, 2018 18:13
Marionette.Gauntlet - an event based "state machine" of sorts, used for building wizard, breadcrumb and tab UI and navigation systems
// Marionette.Gauntlet v0.0.0
// --------------------------
//
// Build wizard-style workflows with an event-emitting state machine
// Requires Backbone.Picky (http://github.com/derickbailey/backbone.picky)
//
// Copyright (C) 2012 Muted Solutions, LLC.
// Distributed under MIT license
Marionette.Gauntlet = (function(Backbone, Picky, Marionette, $, _){