Skip to content

Instantly share code, notes, and snippets.

@keithmancuso
keithmancuso / gist:3907904
Created October 17, 2012 20:20
Safecracker
<script type="text/javascript">var ChannelImages=ChannelImages?ChannelImages:new Object();ChannelImages.Fields=ChannelImages.Fields?ChannelImages.Fields:new Object();ChannelImages.Fields.Field_85={"key":1350503412,"field_name":"member_images","field_label":"Images","settings":{"no_sizes":"no","keep_original":"yes","upload_location":"s3","show_stored_images":"no","stored_images_by_author":"no","stored_images_search_type":"entry","show_import_files":"no","jeditable_event":"click","image_limit":"100","hybrid_upload":"yes","progressive_jpeg":"no","wysiwyg_original":"yes","save_data_in_field":"yes","show_image_edit":"no","allow_per_image_action":"no","locked_url_fieldtype":"no","disable_cover":"no","action_groups":{"1":{"group_name":"small_square","wysiwyg":"yes","actions":{"resize_adaptive":{"width":"160","height":"160","quality":"100","upsizing":"no"}},"final_size":{"width":"160","height":"160","quality":"100","upsizing":"no"},"editable":"no"},"2":{"group_name":"small","wysiwyg":"yes","actions":{"resize":{"width
this is code
@keithmancuso
keithmancuso / gist:6982300
Last active December 25, 2015 13:19
Craft Multiple site Config
return array(
'devMode' => false,
'environmentVariables' => array(
'siteUrl' => 'http://economicexperts.eu/'
),
'.dev' => array(
@keithmancuso
keithmancuso / 0_reuse_code.js
Created December 18, 2013 20:28
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
@keithmancuso
keithmancuso / Add a job form
Created May 18, 2014 20:22
Add a job form
<form method="post" action="" accept-charset="UTF-8">
<input type="hidden" name="action" value="entries/saveEntry">
<input type="hidden" name="redirect" value="account/jobs?added={id}">
<input type="hidden" name="sectionId" value="9">
<input type="hidden" name="enabled" value="0">
<div class="form-group">
<label for="title">Job Title</label>
<input id="title" type="text" class="form-control" name="title">
</div>
@keithmancuso
keithmancuso / familiarASCII.txt
Last active January 31, 2016 16:31
Familiar ASCII Art
<!-- Site by Familiar
//////////////////////
//////////////////////
//////////////////////
///////
///////
///////
///////
///////
///////////////////////
@keithmancuso
keithmancuso / redirect.conf
Created January 31, 2016 16:37
NGINX redirect
server {
listen 80;
server_name familiar.studio www.familiar-studio.com www.familiar.studio familiarstudio.com www.familiarstudio.com familiar.io familiar.is;
return 301 http://familiar-studio.com$request_uri;
}
@keithmancuso
keithmancuso / php.ini
Last active March 17, 2016 21:07
Default php.ini for php 5
[PHP]
;;;;;;;;;;;;;;;;;;;
; About php.ini ;
;;;;;;;;;;;;;;;;;;;
; PHP's initialization file, generally called php.ini, is responsible for
; configuring many of the aspects of PHP's behavior.
; PHP attempts to find and load this configuration from a number of locations.
; The following is a summary of its search order:
@keithmancuso
keithmancuso / migrate.php
Created June 17, 2016 22:12
Move Craft Content Between Element Types
<?php
namespace Craft;
// This file could be placed into your public_html folder and visited to import a cheese product.
$craft = require '../craft/app/bootstrap.php';
$craft->plugins->loadPlugins();
$criteria = craft()->elements->getCriteria(ElementType::Entry);
$criteria->section = 'books';
@keithmancuso
keithmancuso / gist:b37d728c50e60f1390df5df66b4a3696
Created July 10, 2016 23:10
Default SEOMatic tags for layout file
{% set seomaticMeta = {
seoTitle: seoTitle ?? seomaticMeta.seoTitle,
seoDescription: seoDescription ?? seomaticMeta.seoDescription,
seoKeywords: seomaticMeta.seoKeywords,
seoImage: seoImage ?? seomaticMeta.seoImage,
canonicalUrl: canonicalUrl ?? seomaticMeta.canonicalUrl,
twitter: {
card: seomaticMeta.twitter.card,
site: seomaticMeta.twitter.site,
creator: seomaticMeta.twitter.creator,