Skip to content

Instantly share code, notes, and snippets.

# encoding: utf-8
##
# Backup Generated: my_backup
Backup::Model.new(:my_backup, 'Description for my_backup') do
split_into_chunks_of 250
database MySQL do |db|
Vim eklentileri kuruluyor/güncelleniyor...
Downloading Pathogen...
/usr/lib/ruby/1.9.1/net/http.rb:799:in `connect': Connection reset by peer - SSL_connect (Errno::ECONNRESET)
from /usr/lib/ruby/1.9.1/net/http.rb:799:in `block in connect'
from /usr/lib/ruby/1.9.1/timeout.rb:54:in `timeout'
from /usr/lib/ruby/1.9.1/timeout.rb:99:in `timeout'
from /usr/lib/ruby/1.9.1/net/http.rb:799:in `connect'
from /usr/lib/ruby/1.9.1/net/http.rb:755:in `do_start'
from /usr/lib/ruby/1.9.1/net/http.rb:744:in `start'
from /usr/lib/ruby/1.9.1/open-uri.rb:306:in `open_http'
tmux için sürüm 1.4 veya daha yenisi aranıyor...
Yönetici hakları gerekecek; sudo parolası sorulabilir.
(Reading database ... 52678 files and directories currently installed.)
Preparing to replace tmux 1.3-2+squeeze1 (using /tmp/tmp.79B3d8tcmm) ...
Moving obsolete conffile /etc/init.d/tmux-cleanup out of the way...
Unpacking replacement tmux ...
dpkg: dependency problems prevent configuration of tmux:
tmux depends on libevent-2.0-5 (>= 2.0.10-stable); however:
Package libevent-2.0-5 is not installed.
tmux depends on libtinfo5; however:
@ecylmz
ecylmz / dining-philosophers.c
Created March 29, 2012 16:10
Dining philosophers problem
#include <stdio.h>
#include <stdlib.h>
#include <pthread.h>
#include <unistd.h> /* sleep için */
#include <stdint.h> /* uintptr_t için */
/*
* 5 filozof yuvarlak bir masaya oturur. Masada 5 tane tabak ve 5 tane de
* çatal vardır. 5 kişi aynı anda yiyemeceklerini farketmeleri zor olmadı ve
* çatalları sırayla kullanalım dediler (tabii temizledikten sonra).
#!/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'
module.exports = (robot) ->
robot.respond /gist ([0-9]+)/i, (msg) ->
getGist(msg)
robot.hear /https?:\/\/gist\.github\.com\/([0-9]+)/i, (msg) ->
getGist(msg)
getGist = (msg) ->
msg.http("https://api.github.com/gists/#{msg.match[1]}")
module.exports = (robot) ->
robot.respond /gist (.*)/i, (msg) ->
msg.http("https://api.github.com/gists/1709457")
.get() (err, res, body) ->
msg.send JSON.parse(body).files
@ecylmz
ecylmz / hash-upload.php
Created January 31, 2012 08:29
wordpress eklentisi #php #wordpress
<?php
/**
* Plugin Name: Hash Upload Filename
* Plugin URI: http://stackoverflow.com/questions/3259696
* Description: Rename uploaded files as the hash of their original.
* Version: 0.1
*/
/**
http = require 'http'
store = # we'll use a simple object as our store
foo: 'bar'
coffee: 'script'
server = http.createServer (req, res) ->
console.log req.method, req.url
value = store[req.url[1..]]