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
$scope.createComment = function() { | |
// Attach current Article Object | |
var article = $scope.article; | |
// Create new Comment object | |
var comment = new Comments ({ | |
body: this.body | |
}); |
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 | |
/* | |
Plugin Name: GGA SSH2 Sample | |
Description: Sample SSH2 upload | |
Author: Pete Nelson (@GunGeekATX) | |
Version: 1.0 | |
*/ | |
if (!defined( 'ABSPATH' )) exit('restricted access'); |
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
fastcgi_cache_path /etc/nginx/cache levels=1:2 keys_zone=Nginx:100m inactive=60m; | |
fastcgi_cache_key "$scheme$request_method$host$request_uri"; | |
server { | |
listen 80; | |
server_name nginx.dev; | |
access_log /var/log/nginx/nginx.access.log; | |
root /var/www/nginx.dev/public/; | |
index index.html index.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
server { | |
server_name domain.com; | |
listen 443 ssl spdy; | |
root /home/webmaster/www/domain.com; | |
index index.php index.html; | |
# SSL configuration | |
ssl_certificate /home/webmaster/certs/domain.com.crt; | |
ssl_certificate_key /home/webmaster/certs/domain.com.key; |
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
/** | |
* Building Cron-based hook to run periodic update checks and inject update info | |
* into WP data structures. | |
*/ | |
public function setupCron(){ | |
if ( $this->enableAutomaticChecking ) { | |
if ( !wp_next_scheduled('onTransientUpdate') ) { | |
wp_schedule_event(time(), 'hourly', array($this, 'onTransientUpdate')); | |
} | |
} else { |
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
// gform_notification_FORMID, custom_function | |
add_filter('gform_notification_1', 'gfuaa_upload_attachment', 10, 3); | |
// http://gravityformspdfextended.com/topic/file-upload-as-attachments/ | |
function gfuaa_upload_attachment( $notification, $form, $entry ) { | |
//There is no concept of user notifications anymore, so we will need to target notifications based on other criteria, such as name | |
if($notification["name"] == "Admin Notification"){ | |
$fileupload_fields = GFCommon::get_fields_by_type($form, array("fileupload")); |
NewerOlder