Skip to content

Instantly share code, notes, and snippets.

View scottbaggett's full-sized avatar
:electron:

Scott scottbaggett

:electron:
View GitHub Profile
@scottbaggett
scottbaggett / gist:5384065
Created April 14, 2013 20:23
death of the hashbang
# First, we should prevent the Hashbang from ever occuring by
# overriding Backbone’s ‘loadUrl’ method (Hat tip to Michael Franzkowiak):
Backbone.History.prototype.loadUrl = (fragmentOverride) ->
fragment = this.fragment = this.getFragment(fragmentOverride,
this._wantsPushState &&
!this._wantsHashChange)
matched = _.any this.handlers, (handler) ->
if handler.route.test(fragment)
handler.callback(fragment)
Template.articlesForm.events
'submit #formNewArticle': (e, tmpl) ->
e.preventDefault()
# article properties
article =
created_at: new Date()
published_on: new Date(tmpl.find(".datepicker").value)
title: tmpl.find('#inputTitle').value
Meteor.startup ->
#----------------------------------------------------------
# Iron-Router Config
# https://github.com/EventedMind/iron-router
#----------------------------------------------------------
Router.configure
$.ajax({
url: url,
type: "POST",
dataType: "json",
contentType: 'application/json',
data: JSON.stringify(waterfallCredentials),
success: (function(_this) {
return function(response) {
var mobileNum, payload, url;
console.log('successful authentication to waterfall', response);
@scottbaggett
scottbaggett / gist:9821913
Created March 27, 2014 23:59
Overrule the autoscroll behavior inside ui-router
# autoscroll=true has to be on the ui-view for this to fire.
$provide.decorator "$uiViewScroll", ($delegate, $window) ->
(uiViewElement) ->
angular.element($window).scrollTop(0)
@scottbaggett
scottbaggett / wordpress-api-hook.php
Last active August 29, 2015 13:59
Post save callback to cache JSON api
function post_saved_json_callback($post_id)
{
$url = "http://localhost/api/get_posts/?post_type=page,artist,release,episode,post&posts_per_page=10000";
$content = file_get_contents($url);
$output = TEMPLATEPATH . '/brunch-app/public/data/posts.json';
file_put_contents($output, $content);
}
@scottbaggett
scottbaggett / Term
Last active August 29, 2015 14:03
Sample Terms JSON
{
ID:4,
name:"Red",
slug:"red",
description:"",
parent:{
ID:3,
name:"Wines",
slug:"wines",
description:"",
<?php
/**
* WordPress Query Comprehensive Reference
* Compiled by luetkemj - luetkemj.com
*
* CODEX: http://codex.wordpress.org/Class_Reference/WP_Query#Parameters
* Source: https://core.trac.wordpress.org/browser/tags/3.9/src/wp-includes/query.php
*/
$args = array(
{
"binary_file_patterns":
[
"dist/**/*",
"node_modules/**/*",
"fabricator"
],
"caret_extra_width": 1,
"close_windows_when_empty": false,
"color_scheme": "Packages/User/SublimeLinter/sb-nightwatch (SL).tmTheme",
FRAUDULENT PAYMENT #1 - $625 (2015)
Mar 8, 2015 - John emails Chad, a partner at the labels, and asks him to pay for multiple releases, one of which is the payment in question: http://cl.ly/3d3Z1X1s051G
Mar 9, 2015 - Chad pays the invoice via PayPal http://cl.ly/0E0O3h3C1Y2q
Fast forward to may 2016, a week after John resigns from our company, we begin to investigate all of our payments that we’ve made on these labels to establish who paid for what, and many of these payments do not make sense. They don’t match up to artists or managers that we’ve been in contact with.
May 2016 - We reach out to the artists. http://cl.ly/1T003m330t09 They respond that they have no idea what these payments are for, and they do not recognize the email address.