Skip to content

Instantly share code, notes, and snippets.

@jdsimcoe
jdsimcoe / deployments.js
Created November 11, 2013 20:03
Grunt Deployments with Custom SSH Ports
/*
* grunt-deployments
* https://github.com/getdave/grunt-deployments
*
* Copyright (c) 2013 David Smith
* Licensed under the MIT license.
*/
'use strict';
@jdsimcoe
jdsimcoe / config.php
Created October 30, 2013 21:45
Symphony DB Config
if($_SERVER['HTTP_HOST'] == 'accf')
{
$settings['database'] = array(
'character_set' => 'utf8',
'character_encoding' => 'utf8',
'runtime_character_set_alter' => '1',
'query_caching' => 'default',
'host' => 'localhost',
'port' => '3306',
'user' => 'root',
@jdsimcoe
jdsimcoe / SublimeGrunt.sublime-settings
Created October 29, 2013 04:39
SublimeGrunt Settings
{
"exec_args": {
"path": "/usr/local/bin:/usr/local/Cellar/node/0.10.16/bin"
}
}
@jdsimcoe
jdsimcoe / globals.xsl
Created October 28, 2013 23:56
Modal Templates
<xsl:template match="videos-random/entry">
<xsl:call-template name="modal-entry"/>
</xsl:template>
<xsl:template match="videos-all/entry">
<xsl:call-template name="modal-entry"/>
</xsl:template>
@jdsimcoe
jdsimcoe / data.twitter_search.php
Created October 24, 2013 17:26
Symphony-TwitterSearch
<?php
require_once(TOOLKIT . '/class.datasource.php');
require_once(TOOLKIT . '/class.entrymanager.php');
Class datasourcetwitter_search extends Datasource{
public $dsParamROOTELEMENT = 'twitter-search';
@jdsimcoe
jdsimcoe / .htaccess
Created October 22, 2013 05:59
htaccess
### Symphony 2.2.x ###
Options +FollowSymlinks -Indexes
<IfModule mod_rewrite.c>
RewriteEngine on
RewriteBase /
### SECURITY - Protect crucial files
@jdsimcoe
jdsimcoe / Symphony-Header-Error.md
Last active December 26, 2015 04:48
header-information-error

###Symphony Warning:

Cannot modify header information - headers already sent by (output started at /Users/jdsimcoe/Sites/atheycreek/workspace/elasticsearch/mappings/teachings.php:1)

An error occurred in /Users/jdsimcoe/Sites/atheycreek/symphony/lib/toolkit/class.page.php around line 308

303 if($key == 'status' && isset($value['response_code'])) { 304 $res_code = intval($value['response_code']); 305 self::renderStatusCode($res_code); 306 }

@jdsimcoe
jdsimcoe / teachings.json
Created October 21, 2013 23:19
teachings-mapping-json
{
"teachings": {
"properties": {
"title": {
"type" : "multi_field",
"store": "yes",
"fields": {
"title": {"type" : "string"},
"symphony_fulltext" : {"type" : "string", "analyzer": "symphony_fulltext"},
"symphony_autocomplete" : {"type" : "string", "analyzer": "symphony_autocomplete"}
@jdsimcoe
jdsimcoe / teachings.php
Last active December 26, 2015 04:19
teachings-mapping-php
<?php
class elasticsearch_teachings {
public function mapData(Array $data, Entry $entry) {
$json = array();
// var_dump($data);
$json['_boost'] = 1;
@jdsimcoe
jdsimcoe / subsectionprofile
Created October 15, 2013 21:05
SubsectionProfile
Engine Initialisation 0 bytes
FrontendDevKitResolve: debugdevkit 288 KB
FrontendDevKitResolve: logsdevkit 17 KB
FrontendDevKitResolve: profiledevkit 305 KB
Page creation process started 0 bytes
FrontendPrePageResolve: maintenance_mode 62 KB
FrontendPageResolved: globalresourceloader 57 KB
FrontendPageResolved: html5_doctype 36 KB
FrontendPageResolved: members 553 KB
FrontendParamsResolve: globalparamloader 71 KB