angular.module('App',[])
.directive('enter',function(){
return function(scope,element,attrs){
element.bind("keydown keypress",function(event){
if(event.which===13){
event.preventDefault();
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
#!/bin/bash | |
### | |
# | |
# forked from https://gist.github.com/1264701/08f93534ba177f173b9382b53c419cd0de5b07ea | |
# | |
# Ubuntu 14.04 based web server installation script | |
# Run this by executing the following from a fresh install of Ubuntu 14.04 server: | |
# | |
# bash -c "$(curl -fsSL https://gist.githubusercontent.com/simkimsia/691e97f40b2544644f9a/raw/ubuntu14.04-cake2.4.sh)" <mysqlPassword> |
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
before_filter :find_position, only: [:show, :destroy, :edit] | |
def destroy | |
if @position.destroy | |
flash[:success] = t('labels.success') | |
else | |
flash[:error] = t('labels.error') | |
end | |
redirect_to positions_path | |
end |
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
# STEP 1: VERIFY THAT YOU DO NOT ALREADY HAVE POSTGRESQL INSTALLED ON YOUR SYSTEM | |
ps ax | grep postgres | |
# STEP 2: INSTALL POSTGRESQL ON YOUR SYSTEM | |
sudo apt-get update | |
sudo apt-get install postgresql-9.1 | |
# List All Postgres related packages | |
dpkg -l | grep postgres |