$ rails g model User
belongs_to
has_one
#!/bin/bash | |
# Sometimes you need to move your existing git repository | |
# to a new remote repository (/new remote origin). | |
# Here are a simple and quick steps that does exactly this. | |
# | |
# Let's assume we call "old repo" the repository you wish | |
# to move, and "new repo" the one you wish to move to. | |
# | |
### Step 1. Make sure you have a local copy of all "old repo" | |
### branches and tags. |
<?php //ditch this entire line | |
remove_action( 'genesis_header', 'genesis_do_header' ); | |
remove_action( 'genesis_header', 'brainfartin_do_header' ); | |
function brainfartin_do_header() { | |
global $wp_registered_sidebars; | |
genesis_markup( array( |
This entire guide is based on an old version of Homebrew/Node and no longer applies. It was only ever intended to fix a specific error message which has since been fixed. I've kept it here for historical purposes, but it should no longer be used. Homebrew maintainers have fixed things and the options mentioned don't exist and won't work.
I still believe it is better to manually install npm separately since having a generic package manager maintain another package manager is a bad idea, but the instructions below don't explain how to do that.
Installing node through Homebrew can cause problems with npm for globally installed packages. To fix it quickly, use the solution below. An explanation is also included at the end of this document.
This guide is for a first-time Rails developer to deploy their app to Heroku, a popular web-hosting service with strong Rails support. This guide assumes you already have a Heroku account and have installed the Heroku Toolbelt.
<div style="float:left;margin-right:4.166666666%;width:65.277777777%"> | |
<p style="background-color: #1e1e1e;color: #fff;padding: 24px 0;text-align: center">Content (752px)</p> | |
</div> | |
<div style="float:left;width:30.555555555%"> | |
<p style="background-color: #1e1e1e;color: #fff;padding: 24px 0;text-align: center">Sidebar (352px)</p> | |
</div> | |
<div class="clear"></div> | |
<div style="float:left;margin-right:4.166666666%;width:30.555555555%"> |
python manage.py shell |
# Top secret decoder | |
# The CIA has discovered a plot against a major city | |
# SIGINT has intercepted a message with the location and date of the attack | |
# Unfortunately, the message is encoded. | |
# Due to your awesome Python skills, you have been hired to decode the message | |
# A double agent has provided the encoding scheme which is as follows: | |
# All numbers need to be changed to spaces | |
# All capital letters should be changed to * | |
# The lowercase letter q is equal to \n | |
# All other lowercase letters should be ignored. |
# Rock Paper Scissors ASCII Art | |
# Rock | |
print(""" | |
_______ | |
---' ____) | |
(_____) | |
(_____) | |
(____) | |
---.__(___) |
#Janken with Loop Assignment Example by Christian Thompson | |
#Uses Random numbers 1-3 to represent Rock, Paper, Scissors | |
#Initialize | |
import os | |
import random | |
import time | |
#Declare variables |