Skip to content

Instantly share code, notes, and snippets.

@anmaslov
anmaslov / Rake Database.md
Created April 16, 2018 09:08 — forked from stevenyap/Rake Database.md
List of rake commands to manage database

Create database

rake db:create

Create database table

This will creates a migration file in /db/migrate without table definition.

rails g migration create_<TABLE>
@anmaslov
anmaslov / WordPress
Created November 22, 2015 17:32 — forked from AlexanderDolgan/WordPress
query_posts
<?php if ( have_posts() ) : query_posts('p=1');
while (have_posts()) : the_post(); ?>
<?php the_title(); ?>
<?php the_content(); ?>
<?php the_post_thumbnail(array(100, 100)); ?>
<? endwhile; endif; wp_reset_query(); ?>