Skip to content

Instantly share code, notes, and snippets.

@ecylmz
ecylmz / README.md
Created July 26, 2012 12:14 — forked from roktas/README.md
  • Yapılandırmalar eski yerinde /etc/unicorn
  • unicorn-multi.sh (şimdilik) /etc/unicorn altında (executable olması gerekmiyor
  • unicorn-multi betiği /etc/init.d altında
  • Bu sistemin çalışması için mevcut unicorn betiğini kaldırmak gerekmiyor ama kaldırılırsa daha güvenli olabilir.
@ecylmz
ecylmz / unicorn
Created July 24, 2012 14:13
/etc/init.d script for unicorn
#!/bin/sh
#
# init.d script for single or multiple unicorn installations. Expects at least one .conf
# file in /etc/unicorn
#
# Modified by jay@gooby.org http://github.com/jaygooby
# based on http://gist.github.com/308216 by http://github.com/mguterl
#
## A sample /etc/unicorn/my_app.conf
##
@ecylmz
ecylmz / unicorn
Created July 24, 2012 14:13
/etc/init.d script for unicorn
#!/bin/sh
#
# init.d script for single or multiple unicorn installations. Expects at least one .conf
# file in /etc/unicorn
#
# Modified by jay@gooby.org http://github.com/jaygooby
# based on http://gist.github.com/308216 by http://github.com/mguterl
#
## A sample /etc/unicorn/my_app.conf
##
#!/bin/sh
set -e
CONFFILE="/etc/default/grub"
[ $(id -u) -eq 0 ] || { echo >&2 "Betiği sudo ile çalıştırın"; exit 1; }
[ -f "$CONFFILE" ] || { echo >&2 "$CONFFILE dosyası bulunamadı."; exit 1; }
if grep -q bootchartd "$CONFFILE"; then
@ecylmz
ecylmz / gist:1974386
Created March 4, 2012 19:08 — forked from shripadk/gist:652819
Express authentication using Redis for session store and Couchdb for database (in coffeescript!)
###
Module dependencies
###
require.paths.unshift "#{__dirname}/lib/support/express-csrf/"
require.paths.unshift "#{__dirname}/lib/support/node_hash/lib/"
express = require 'express'
app = module.exports = express.createServer()
RedisStore = require 'connect-redis'
@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 {
@ecylmz
ecylmz / mkpdf
Created February 11, 2011 20:51 — forked from roktas/jp
#!/bin/bash
# markdown ile yazılan dosyalardan pdf üret.
# Örnek: <betik> ~/examples.md
PATH=/var/lib/gems/1.8/bin:$PATH
[ $# -gt 0 ] || {
echo >&2 "Kullanım: $0 < markdown dosyası>"
echo >&2 "Örnek: $0 ~/examples.md"
from graphics import *
def main():
win = GraphWin("My Circle", 100, 100)
c = Circle(Point(50,50), 10)
c.draw(win)
win.getMouse() # Pause to view result
win.close() # Close window when done
main()
# graphics.py
"""Simple object oriented graphics library
The library is designed to make it very easy for novice programmers to
experiment with computer graphics in an object oriented fashion. It is
written by John Zelle for use with the book "Python Programming: An
Introduction to Computer Science" (Franklin, Beedle & Associates).
LICENSE: This is open-source software released under the terms of the
GPL (http://www.gnu.org/licenses/gpl.html).