Setup
Generate models.
rails g model author name:string
rails g model book title:string author:references
bundle exec rake db:migrate
Setup
Generate models.
rails g model author name:string
rails g model book title:string author:references
bundle exec rake db:migrate
This is probably the quickest way to install nodejs and npm on 12.04. For compiling and install from source check this.
Use launchpad repo by Chris Lea
sudo apt-get install python-software-properties
sudo apt-add-repository ppa:chris-lea/node.js
sudo apt-get update
// Fills all textareas and text input fields in page with random characters | |
$.each($("textarea, input[type='text']"), function(index, textfield){ | |
$(textfield).val(Math.random().toString(24).substring(7)) | |
}); |
{ | |
"always_show_minimap_viewport": true, | |
"bold_folder_labels": true, | |
"color_scheme": "Packages/Material Theme/schemes/Material-Theme.tmTheme", | |
"ensure_newline_at_eof_on_save": true, | |
"font_options": | |
[ | |
"subpixel_antialias" | |
], | |
"ignored_packages": |
var deleteAllGroupMembers = (function () { | |
var deleteAllGroupMembers = {}; | |
// the facebook ids of the users that will not be removed. | |
// IMPORTANT: add your own facebook id here so that the script will not remove yourself! | |
var excludedFbIds = ['1234','11223344']; // make sure each id is a string! | |
var usersToDeleteQueue = []; | |
var scriptEnabled = false; | |
var processing = false; | |
deleteAllGroupMembers.start = function() { |
Install postgres.
sudo sh -c "echo 'deb http://apt.postgresql.org/pub/repos/apt/ precise-pgdg main' > /etc/apt/sources.list.d/pgdg.list"
wget --quiet -O - http://apt.postgresql.org/pub/repos/apt/ACCC4CF8.asc | sudo apt-key add -
sudo apt-get update
sudo apt-get install postgresql postgresql-contrib libpq-dev
Change to posgres user who is the default user created by postgres
{ | |
"book": [ | |
{ | |
"title": "Σημεία και τέρατα της οικονομίας", | |
"subtitle": "Η κρυφή πλευρά των πάντων", | |
"image": "http://www.biblionet.gr/images/covers/b103788.jpg", | |
"author": [ | |
{ | |
"name": "Levitt, Steven D.", | |
"firstname": "Steven D.", |
{ | |
"image": "http://www.biblionet.gr/images/covers/b1062.jpg", | |
"title": "Προϊστορικά ζώα σε κουκκίδες", | |
"authors": [ | |
"Μόνικα Ρούσσο" | |
], | |
"contributors": { | |
"μετάφραση": [ | |
"Δήμος Αυγερινός" | |
] |
### Install Oracle Java 8, this means you agree to their binary license!! | |
cd ~ | |
sudo add-apt-repository -y ppa:webupd8team/java | |
sudo apt-get update | |
echo debconf shared/accepted-oracle-license-v1-1 select true | sudo debconf-set-selections | |
echo debconf shared/accepted-oracle-license-v1-1 seen true | sudo debconf-set-selections | |
sudo aptitude -y install oracle-java8-installer | |
### Download and Install ElasticSearch |