Skip to content

Instantly share code, notes, and snippets.

# Minimal sample configuration file for Unicorn (not Rack) when used
# with daemonization (unicorn -D) started in your working directory.
#
# See http://unicorn.bogomips.org/Unicorn/Configurator.html for complete
# documentation.
# See also http://unicorn.bogomips.org/examples/unicorn.conf.rb for
# a more verbose configuration using more features.
app_path = "/opt/foo"
# Your thin servers go here
upstream appserver {
server 0.0.0.0:3000;
server 0.0.0.0:3001;
}
# The usual server
server {
listen 80;
#!/bin/sh
#
# init.d script for single or multiple unicorn installations. Expects at least one .conf
# file in /etc/unicorn
#
# Modified by [email protected] http://github.com/jaygooby
# based on http://gist.github.com/308216 by http://github.com/mguterl
#
## A sample /etc/unicorn/my_app.conf
##

projenin sunucuda barındırılması

projeler /opt altına read-only olarak klonlanır.

    cd /opt
    sudo git clone git://github.com/kullanıcı/depo-adı.git

Daha sonra /srv/www/domain-adı/site yoluna sembolik link ile bağlanır.

sudo ln -s /opt/depo-adı /srv/www/domain-adı/site

last_post = Dir.glob("*").sort_by do |f|
File.mtime(f)
end
.reverse
.first
p last_post
require 'tlsmail'
require 'time'
from = "[email protected]"
to = "[email protected]"
p = "password"
filename = "sendmail.rb"
file = File.read(filename)
encode_file = [file].pack("m")
require 'tlsmail'
require 'time'
from = "[email protected]"
to = "[email protected]"
p = "password"
content = <<EOF
From: #{from}
To: #{to}
subject: TEST from ruby
@ecylmz
ecylmz / gist_line_numbers.css
Created December 10, 2011 13:30 — forked from roktas/.gitignore
CSS to add line numbers to embedded gists
.gist-highlight {
border-left: 3ex solid #eee;
position: relative;
}
.gist-highlight pre {
counter-reset: linenumbers;
}
.gist-highlight pre div:before {
---------------
-- Options --
---------------
options.timeout = 120
options.subscribe = true
----------------
-- Accounts --
# encoding: utf-8
# https://github.com/ecylmz/ecylmz.github.com deposu için Rakefile
#
# rake => rake n[9]
# rake n[9] => 9 kategorisinde yeni yazı oluşturur.
# rake n[1] => 1 kategorisinde yeni yazı oluşturur.
# rake e => son oluşturulan yazıyı düzenler.
# rake p => son yazıyı push yapar.