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
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="UTF-8"> | |
<title>404 Page · CodePen</title> | |
<style> |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="UTF-8"> | |
<title>404 Page · CodePen</title> | |
<style> |
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 | |
for f in *.scss; do sass-convert $f ${f%scss}sass ; done | |
rm *.scss |
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
require 'rubygems' | |
require 'couchbase' | |
CONFIG = { | |
:node_list => ["localhost:8091"], | |
:key_prefix => "pool_", | |
:pool_size => 3 | |
} | |
def connection(bucket) |
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
def index | |
@messages = Message.all | |
end | |
def show | |
@messages = Message.find(params[:id]) | |
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
def message | |
if params['subject'].to_s.strip.downcase == "joke" | |
Message.create!({ message_type: "joke", from: params['from'], body: params['text'] }) | |
render :json => { "message" => "RIGHT" }, :status => 200 | |
else |
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
render :json => { "message" => "RIGHT" }, :status => 200 |
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
Website::Application.routes.draw do | |
resources :messages, :only => [:index, :show] | |
post '/message' => 'messages#message' | |
root 'messages#index' | |
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
skip_before_action :verify_authenticity_token |
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
docker build -t="my_nginx_image" . | |
Uploading context 25.09 kB | |
Uploading context | |
Step 0 : FROM ubuntu | |
---> 9cd978db300e | |
Step 1 : MAINTAINER O.S. Tezer, ostezer@gmail.com | |
---> Using cache | |
---> 467542d0cdd3 | |
Step 2 : RUN echo "deb http://archive.ubuntu.com/ubuntu/ raring main universe" >> /etc/apt/sources.list |
OlderNewer