select array_to_json(array_agg(row_to_json(t)))
from (
SELECT id, interaction_id, comment_id, created_at, state FROM ugc_permissions
WHERE EXTRACT(MONTH FROM created_at) IN (8,9)
AND EXTRACT(YEAR FROM created_at) = 2017
ORDER BY created_at ASC
) t
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
/* Cranium MVC | |
* A minimalist MVC implementation written for | |
* demonstration purposes at my workshops | |
* http://addyosmani.com | |
* Copyright (c) 2012 Addy Osmani; Licensed MIT */ | |
var Cranium = Cranium || {}; | |
// Set DOM selection utility |
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
/* Simple JavaScript Inheritance | |
* By John Resig http://ejohn.org/ | |
* MIT Licensed. | |
* Usage exmaples: http://ejohn.org/blog/simple-javascript-inheritance/ | |
*/ | |
// Inspired by base2 and Prototype | |
(function(){ | |
var initializing = false, fnTest = /xyz/.test(function(){xyz;}) ? /\b_super\b/ : /.*/; | |
// The base Class implementation (does nothing) | |
this.Class = function(){}; |
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
<span> | |
<select name="day"> | |
<option value="monday">Monday</option> | |
<option value="tuesday">Tuesday</option> | |
<option value="wednesday">Wednesday</option> | |
<option value="thursday">Thursday</option> | |
<option value="friday">Friday</option> | |
<option value="saturday">Saturday</option> | |
<option value="sunday">Sunday</option> | |
</select> |
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
# Change YOUR_TOKEN to your prerender token | |
# Change http://example.com (at the end of the last RewriteRule) to your website url | |
<IfModule mod_headers.c> | |
RequestHeader set X-Prerender-Token "YOUR_TOKEN" | |
</IfModule> | |
<IfModule mod_rewrite.c> | |
RewriteEngine On |
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
echo "This is our provisioning script" | |
apt-get update | |
apt-get install -y python-software-properties python g++ make | |
add-apt-repository ppa:chris-lea/node.js | |
apt-get update | |
apt-get install -y nodejs | |
npm install -g grunt-cli |
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
#usage: | |
#{% loop_directory directory:images iterator:image filter:*.jpg sort:descending %} | |
# <img src="{{ image }}" /> | |
#{% endloop_directory %} | |
module Jekyll | |
class LoopDirectoryTag < Liquid::Block | |
include Liquid::StandardFilters | |
Syntax = /(#{Liquid::QuotedFragment}+)?/ |
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
angular.module('myApp', ['ionic', 'myApp.services', 'myApp.controllers']) | |
.run(function(DB) { | |
DB.init(); | |
}); |
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
# Middleman - Inline SVG Helper | |
# ------------------------------------------------------------------------------ | |
# | |
# Installation | |
# ------------ | |
# 1. Save this file at `[project_root]/helpers/image_helpers.rb` | |
# 2. Open the project's Gemfile and add this line: `gem "oga"` | |
# 3. Run `bundle install` from the command line | |
# | |
# Note: Restart your local Middleman server (if it's running) before continuing |
OlderNewer