Skip to content

Instantly share code, notes, and snippets.

View adamdilek's full-sized avatar
🎯
focusing

Adam Dilek adamdilek

🎯
focusing
View GitHub Profile
{
"total":81,
"cities":[
{"id":1,"name":"Adana","d_count":15},
{"id":2,"name":"Ad\u0131yaman","d_count":9},
{"id":3,"name":"Afyonkarahisar","d_count":18},
{"id":4,"name":"A\u011fr\u0131","d_count":8},
{"id":5,"name":"Amasya","d_count":7},
{"id":6,"name":"Ankara","d_count":25},
{"id":7,"name":"Antalya","d_count":19},
@adamdilek
adamdilek / .gitignore
Created April 11, 2012 14:34
örnek .gitignore dosyası
.bundle
db/*.sqlite3
db/database.yml
log/*.log
log/*.pid
.sass-cache/
tmp/**/*
.rvmrc
.DS_Store
db-dumps
@adamdilek
adamdilek / mail.rb
Created April 18, 2012 11:31
mail setings
#Mails Settings
config.action_mailer.default_url_options = { :host => 'localhost:3000' }
config.action_mailer.delivery_method = :smtp
config.action_mailer.smtp_settings = {
:address => "smtp.gmail.com",
:port => 587,
:domain => 'gmail.com',
:user_name => 'username',
:password => 'password',
:authentication => 'plain',
@adamdilek
adamdilek / country.sql
Created April 24, 2012 22:26
Country list
CREATE TABLE `countries` (
`id` int(11) NOT NULL auto_increment,
`country_code` varchar(2) NOT NULL default '',
`country_name` varchar(100) NOT NULL default '',
PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=240 ;
--
-- Dumping data for table `countries`
--
INSERT INTO `countries` VALUES (1, 'US', 'United States');
@adamdilek
adamdilek / rails.org
Created May 14, 2012 15:39 — forked from map7/rails.org
Rails 3.1 autocomplete using coffee-script and jquery-ui
@adamdilek
adamdilek / autocomplatetextarea.js
Created June 28, 2012 12:24
Autocomplate Textarea
/**
* Plugin Name: Autocomplete for Textarea
* Author: Amir Harel
* Copyright: amir harel ([email protected])
* Twitter: @amir_harel
* Version 1.4
* Published at : http://www.amirharel.com/2011/03/07/implementing-autocomplete-jquery-plugin-for-textarea/
*/
(function($){
@adamdilek
adamdilek / auto.html
Created June 28, 2012 16:05
TExt area autocomplete HTML
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8" /><meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" /><script src="http://1.2.3.4/bmi-int-js/bmi.js" language="javascript"></script><title>demo</title> <meta name="description" content="" /><meta name="generator" content="Studio 3 http://aptana.com/" /><meta name="author" content="amir" /><meta name="viewport" content="width=device-width; initial-scale=1.0" /><link rel="shortcut icon" href="/favicon.ico" /><link rel="apple-touch-icon" href="/apple-touch-icon.png" /><style type="text/css" style="display:none">ul.auto-list{display:none;position:absolute;top:0px;left:0px;border:1px solid green;background-color:#A3DF99;padding:0;margin:0;list-style:none;}ul.auto-list>li:hover,ul.auto-list>li[data-selected=true]{background-color:#236574;}ul.auto-list>li{border:1px solid gray;cursor:default;padding:2px;}mark{font-weight:bold;}
</style>
<style type="text/css">#ta{width:300px;height :100px;font-size:11px;font-family:"Helvetica Neue",Arial,sans-se
@adamdilek
adamdilek / template.rb
Created June 30, 2012 12:23
RAils template
# create rvmrc file
create_file ".rvmrc", "rvm gemset use #{app_name}"
gem "haml-rails"
gem "sass"
# hpricot and ruby_parser required by haml
gem "hpricot", :group => :development
gem "ruby_parser", :group => :development
gem "nifty-generators"
gem "simple_form"
@adamdilek
adamdilek / heroku
Created July 31, 2012 19:40
herku db pul push error
Loaded Taps v0.3.24
Auto-detected local database: mysql2://root:root@localhost/api-app_development?encoding=utf8
Warning: Data in the database 'mysql2://root:root@localhost/api-app_development?encoding=utf8' will be overwritten and will not be recoverable.
! WARNING: Potentially Destructive Action
! This command will affect the app: pigonws
! To proceed, type "pigonws" or re-run this command with --confirm pigonws
> pigonws
/home/muhammetdilek/.rvm/gems/ruby-1.9.3-p194/gems/sequel-3.20.0/lib/sequel/adapters/mysql2.rb:58: [BUG] Segmentation fault
@adamdilek
adamdilek / binlistesi.sql
Created August 25, 2012 12:43
Türkiye BIN listesi
/*
Guncel BIN LISTESI
twitter : http://twitter.com/tserpico
*/
SET FOREIGN_KEY_CHECKS=0;
-- ----------------------------
-- Table structure for `binlist`
-- ----------------------------