This file contains hidden or 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
## | |
# You should look at the following URL's in order to grasp a solid understanding | |
# of Nginx configuration files in order to fully unleash the power of Nginx. | |
# http://wiki.nginx.org/Pitfalls | |
# http://wiki.nginx.org/QuickStart | |
# http://wiki.nginx.org/Configuration | |
# | |
# Generally, you will want to move this file somewhere, and start with a clean | |
# file but keep this around for reference. Or just disable in sites-enabled. | |
# |
This file contains hidden or 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
Жила-была курица. И решила она вступить в мафию. | |
Пошла курица к самому главному мафиози, к суровому дону, и говорит: | |
хочу в мафию! А дон ей отвечает: нет никакой мафии. | |
Тогда курица пошла к советнику дона, консильери, и попросила принять | |
ее в мафию. Но консильери ответил курице: нет никакой мафии. | |
Тогда курица пошла к капитану мафии и попросилась к нему солдатом. | |
Но капитан сказал курице: нет никакой мафии. | |
Курица загрустила и побрела к себе курятник. | |
А там к ней прибежали курицы-подружки и засыпали ее вопросами. | |
На все вопросы курица отвечала: нет никакой мафии... |
This file contains hidden or 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 File.expand_path(File.dirname(__FILE__) + '/neo') | |
class AboutHashes < Neo::Koan | |
def test_creating_hashes | |
empty_hash = Hash.new | |
assert_equal __, empty_hash.class | |
assert_equal(__, empty_hash) | |
assert_equal __, empty_hash.size | |
end |
This file contains hidden or 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
## | |
# Thursday 2016.07.15 21:22 http://vjuh-developer.livejournal.com/5319.html | |
# Monday 2017.01.23 19:14 | |
# Start to create the configuration for my PUMA | |
# http://stackoverflow.com/questions/17450672/how-to-start-puma-with-unix-socket | |
## | |
upstream sitenumber1_app { | |
server unix:///tmp/sitenumber1.socket; | |
} |
This file contains hidden or 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
source 'https://rubygems.org' | |
git_source(:github) do |repo_name| | |
repo_name = "#{repo_name}/#{repo_name}" unless repo_name.include?("/") | |
"https://github.com/#{repo_name}.git" | |
end | |
# Bundle edge Rails instead: gem 'rails', github: 'rails/rails' | |
gem 'rails', '~> 5.0.1' |
This file contains hidden or 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 Category < ActiveRecord::Base | |
has_many :sub_cat, class_name: "Category", | |
foreign_key: "categoriable_id" | |
belongs_to :main_cat, class_name: "Category" | |
end |
This file contains hidden or 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 TrueClass | |
def is_true | |
yield | |
self | |
end | |
def is_false | |
self | |
end | |
end |
This file contains hidden or 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
$LOAD_PATH.unshift(File.dirname(__FILE__)) | |
require "two" | |
require "two" | |
puts "It works." |
This file contains hidden or 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
// ... | |
stream{ | |
server { | |
listen 27911 udp; | |
proxy_pass quake2; | |
} | |
upstream quake2 { | |
server 192.168.1.2:27922; | |
} | |
} |
This file contains hidden or 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
# https://github.com/rubyide/vscode-ruby/wiki/1.-Debugger-Installation | |
# This is configuration for rubyide/vscode https://github.com/rubyide/vscode-ruby | |
# Debugger | |
# An interface which glues ruby-debug to IDEs like Eclipse (RDT), NetBeans and RubyMine. | |
# https://rubygems.org/gems/ruby-debug-ide/versions/0.6.0 | |
gem list ruby-debug-ide --remote | |
gem install ruby-debug-ide -v 0.6.0 | |
gem list ruby-debug-ide --local |