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 | |
// 13: Post ID of the page the repeater is located on | |
if( have_rows('questions_and_answers', 13) ): | |
// loop through the rows of data | |
while ( have_rows('questions_and_answers', 13) ) : the_row(); | |
// display a sub field value | |
//193: Post ID of reusable part template |
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
# CREATE DATABASE tweetclone WITH ENCODING 'UTF-8' | |
require 'sequel' | |
require 'logger' | |
# CONNECTION ================================ | |
DB = Sequel.connect(ENV['DATABASE_URL'] ||'postgres://postgres:password@localhost/tweetclone') | |
# Logging SQL Queries | |
DB.loggers << Logger.new($stdout) |
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
# Sequel Google Groups | |
# Topic: https://groups.google.com/forum/?fromgroups#!topic/sequel-talk/WlgsyLtd9eE | |
require 'sequel' | |
require 'logger' | |
require 'date' | |
# Connection | |
# ============= |
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
require 'open-uri' | |
require 'nokogiri' | |
require 'parslet' | |
require 'csv' | |
# -------------------------------------------------- | |
# Auxiliary code | |
class String |