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
http://stackoverflow.com/questions/22667401/postgres-json-data-type-rails-query | |
http://stackoverflow.com/questions/40702813/query-on-postgres-json-array-field-in-rails | |
#payload: [{"kind"=>"person"}] | |
Segment.where("payload @> ?", [{kind: "person"}].to_json) | |
#data: {"interest"=>["music", "movies", "programming"]} | |
Segment.where("data @> ?", {"interest": ["music", "movies", "programming"]}.to_json) | |
Segment.where("data #>> '{interest, 1}' = 'movies' ") | |
Segment.where("jsonb_array_length(data->'interest') > 1") |
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
{ | |
"Type" : "SubscriptionConfirmation", | |
"MessageId" : "0941b7b3-4797-44e5-8079-dbf8ef09793f", | |
"Token" : "2336412f37fb687f5d51e6e241d164b0533302ec696efc8f113cd2252ce8a925c1e44a3c4ca2984675da85b9bd8c05da85337beb1f24a9c659b22ed3a8cc682f3457c4ead28d392a40e5c35c0e9> | |
"TopicArn" : "arn:aws:sns:us-west-2:164053224164:email-list", | |
"Message" : "You have chosen to subscribe to the topic arn:aws:sns:us-west-2:164053224164:email-list.\nTo confirm the subscription, visit the SubscribeURL included in this message", | |
"SubscribeURL" : "https://sns.us-west-2.amazonaws.com/?Action=ConfirmSubscription&TopicArn=arn:aws:sns:us-west-2:164053224164:email-list&Token=REDACTED", | |
"Timestamp" : "2013-10-05T17:00:04.135Z", | |
"SignatureVersion" : "1", | |
"Signature" : "<REDACTED>" |
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
#! /bin/sh | |
### BEGIN INIT INFO | |
# Provides: nginx | |
# Required-Start: $all | |
# Required-Stop: $all | |
# Default-Start: 2 3 4 5 | |
# Default-Stop: 0 1 6 | |
# Short-Description: starts the nginx web server | |
# Description: starts nginx using start-stop-daemon |
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 curry(fn) { | |
var args = [].slice.call(arguments, 1); | |
function curried(fnArgs) { | |
if (fnArgs.length >= fn.length) { | |
return func.apply(null, fnArgs); | |
} | |
return function () { | |
return curried(fnArgs.concat([].slice.apply(arguments))); |
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
add this before | |
<!--.social-media--> | |
<?php if($at_options['pinterest'] != '') {?><li class="tt" data-toggle="tooltip" data-container="body" data-placement="left" title="<?php _e('Find us on Pinterest','at'); ?>"><a href="<?php echo $at_options['pinterest']; ?>" class="icon-pinterest"></a></li><?php } ?> | |
and in inc/theme-options.php | |
add this |
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 | |
global $at_options; | |
get_header(); ?> | |
<?php | |
if(have_posts()) : while(have_posts()) : the_post(); | |
$page_meta = get_post_meta($post->ID,'page_meta',true); | |
$portfolio_meta = get_post_meta($post->ID,'portfolio_meta',true); | |
$images = get_post_meta($post->ID,'portfolio_images',true); |
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
# Capistrano Laravel 4 Deployment Tasks | |
# Watts Martin (layotl at gmail com) | |
# https://gist.github.com/chipotle/5506641 | |
# updated 14-Aug-2013 | |
# Assumptions: | |
# | |
# - You are using a .gitignore similar to Laravel's default, so your | |
# vendor directory and composer(.phar) are *not* under version control | |
# - Composer is installed as an executable at /usr/local/bin/composer |
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 | |
if ( !function_exists('at_remove_autop') ) { | |
function at_remove_autop($content) { | |
$content = do_shortcode( shortcode_unautop($content) ); | |
$content = preg_replace( '#^<\/p>|^<br \/>|<p>$#', '', $content ); | |
return $content; | |
} |
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 | |
/**** WIDGETS AREA ****/ | |
/* ***************************************************** | |
* Plugin Name: Cleanography Recent Posts | |
* Description: Display Recent Posts with Thumbs. | |
* Version: 1.0 | |
* Author: Atinder | |
* Author URI: http://www.atinder.com |
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
# be sure to comment out the require 'capistrano/deploy' line in your Capfile! | |
# config valid only for Capistrano 3.1 | |
lock '3.2.1' | |
set :application, 'my-cool-application' | |
# the base docker repo reference | |
set :name, "johns-stuff/#{fetch(:application)}" |
NewerOlder