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
server { | |
listen 80; | |
server_name _; | |
root /vagrant/www; | |
index index.html index.htm index.php; | |
expires -1; | |
location / { | |
try_files $uri $uri/ /index.php?q=$uri&$args; |
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
class ContactUsController < ApplicationController | |
def index | |
end | |
def send_enquiry | |
if contact_form_valid? | |
ContactUsMailer.send_enquiry(contact_form_params).deliver | |
return redirect_to action: :thank_you | |
end | |
render :index |
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
<html> | |
<head> | |
<title>Vogue</title> | |
<style type="text/css"> | |
#social-logos { | |
overflow: hidden; | |
} | |
#social-logos a{ | |
float: left; |
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
class Seeds | |
def self.add model, attrs | |
object = model.find_or_initialize_by(attrs) | |
if object.new_record? && object.save | |
puts "#{object}" | |
end | |
end | |
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
ruby '2.2.1' | |
source 'https://rails-assets.org' do | |
gem 'rails-assets-bootstrap' | |
end | |
source 'https://rubygems.org' do | |
gem 'rails', '4.2' | |
# Database / Memcache / Solr |
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
<%= yeild :some_content %> |
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
if(!jQuery('<input PLACEHOLDER="1" />')[0].placeholder){ //Uppercase attr for IE | |
jQuery(':input[placeholder]').each(function(){ | |
var $this = $(this); | |
if(!$this.val()){ | |
$this.val($this.attr('placeholder')); | |
$this.addClass('input-placeholder'); | |
} | |
}).live('focus', function(e){ | |
var $this = $(this); | |
if($this.hasClass('input-placeholder')){ |
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 | |
// Input must be a number | |
if(is_numeric($input)){ | |
echo 'Input is a number'; | |
} else { | |
echo 'Input is not a number'; | |
} | |
// Input can only contain numbers and letters. | |
if(preg_match('/([^A-z0-9])/', $input)){ |
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
<!–[if IE]> | |
This will only show for Internet Explorer (IE) | |
<![endif]–> | |
<!–[if !IE]> | |
This will only show if the client is not using IE. | |
<!–[endif]> | |
<![if IE 6]–> | |
Only shows on IE6 | |
<!–[endif]> | |
<![if lte IE 6]–> |
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
order allow,deny | |
allow from [IP here] | |
deny from all |
OlderNewer