View gist:828f1efa5051865bb893
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require.config({ | |
baseUrl:'/js/Dash', | |
shim: { | |
backbone: { | |
deps: [ | |
"underscore", | |
"jquery" | |
], | |
exports: "Backbone" | |
}, |
View gist:e53bd9bed89ee519f716
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
● apache2.service - LSB: Apache2 web server | |
Loaded: loaded (/etc/init.d/apache2) | |
Active: failed (Result: exit-code) since Thu 2015-05-14 11:50:34 EDT; 6min ago | |
Process: 5837 ExecStart=/etc/init.d/apache2 start (code=exited, status=1/FAILURE) |
View Field Options
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"id":"whitepaper_acf", | |
"title":"Whitepaper ACF", | |
"location":[ | |
[ | |
{ | |
"param":"post_type", | |
"operator":"==", | |
"value":"upnup-whitepapers", | |
"order_no":0, |
View gist:4bcb39bffad148141f08
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<table cellspacing="0" cellpadding="0" class="gstl_50 gssb_c" style="width: 599px; top: 485px; position: absolute; text-align: left; /* display: none; */ left: 34px;" dir="ltr"> | |
<tbody> | |
<tr> | |
<td class="gssb_f"></td> | |
<td class="gssb_e" style="width: 100%;"> | |
<table cellspacing="0" cellpadding="0" class="gsc-completion-container" style="width: 100%;"> | |
<tbody> | |
<tr class=""> | |
<td class="gssb_a " dir="ltr" style="text-align: left;"> | |
<div class="gsq_a"> |
View gist:59459f6124527e3ba80f
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function create_post_types() { | |
register_post_type('degrees-and-programs', [ | |
'labels' => [ | |
'name' => 'Degrees and Programs', | |
'all_items' => 'All Degrees/Programs' | |
], | |
'public' => true, | |
'has_archive' => true, | |
'rewrite' => ['slug' => 'degrees-and-programs'], | |
'hierarchical' => true, |
View gist:4cad0747c90f9b5ab729
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$this->Source = $this->getMock('PwfSource'); | |
ConnectionManager::create($this->sourceName, array( | |
'datasource' => get_class($this->Source), | |
)); | |
$this->Model = $this->getMock( | |
'PwfTask', | |
array('getDataSource'), |
View test.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
App::uses('PwfSource', 'Model/Datasource'); | |
App::uses('Model', 'Model'); | |
public function setUp() { | |
$this->Source = ClassRegistry::init('PwfSource'); | |
$this->sourceMethods = get_class_methods($this->Source); | |
$methods = array_diff($this->sourceMethods, ['read', '__call', '__isset', '__get']); | |
$this->Source = $this->getMock('PwfSource', $methods); |
View request.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Request = { | |
send: function (options) { | |
this.options.success = this.success.bind(this); | |
this.options.error = this.error.bind(this); | |
this.options = _.extend(this.options, options) | |
return this.request(this.options); | |
}, | |
request: function (options){ | |
return new Promise(function (resolve, reject){ | |
// Do the usual XHR stuff |
View stuff.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
this.beforeSave() | |
.then(this.send.bind(this)) | |
.then(this.success.bind(this)) | |
.then(this.afterSave.bind(this)) | |
// Error validation shown in page | |
.catch(function(error){ | |
// HERE IS WHERE I WANT THE DEFAULT HTML5 ERRORS TO SHOW | |
// This will be called if any of the above promises throw an error | |
}) | |
.then(this.enable_save.bind(this)) |
View gist:99699b30d816e2710bdf
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if (isset($attachment['transformers'][$class])) { | |
return new $attachment['transformers'][$class]($options); | |
} |
OlderNewer