Skip to content

Instantly share code, notes, and snippets.

View melihkocaturk's full-sized avatar

Melih melihkocaturk

View GitHub Profile
@melihkocaturk
melihkocaturk / README-Template.md
Created March 25, 2019 12:30 — forked from PurpleBooth/README-Template.md
A template to make good README.md

Project Title

One Paragraph of project description goes here

Getting Started

These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.

Prerequisites

@melihkocaturk
melihkocaturk / strip-emoji.rb
Created November 4, 2016 10:49 — forked from adamlwatson/strip-emoji.rb
Strip emoji
# this scrubs emoji sequences from a string - i think it covers all of them
def strip_emoji ( str )
str = str.force_encoding('utf-8').encode
clean_text = ""
# emoticons 1F601 - 1F64F
regex = /[\u{1f600}-\u{1f64f}]/
clean_text = str.gsub regex, ''
@melihkocaturk
melihkocaturk / seeds.rb
Created November 2, 2016 13:38 — forked from seyhunak/seeds.rb
Rails - Import SQL file as seed
unless Rails.env.production?
connection = ActiveRecord::Base.connection
connection.tables.each do |table|
connection.execute("TRUNCATE #{table}") unless table == "schema_migrations"
end
sql = File.read('db/import.sql')
statements = sql.split(/;$/)
statements.pop
@melihkocaturk
melihkocaturk / turkce_isimler.sql
Created October 11, 2016 12:27 — forked from ismailbaskin/turkce_isimler.sql
Türkçe isim veritabanı
-- Turkce isimler sozlugu twitter : http://twitter.com/tserpico
CREATE TABLE `isimler` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`isimler` varchar(255) DEFAULT NULL,
`cinsiyet` varchar(255) DEFAULT NULL COMMENT 'erkek : E , kadın : K , uniseks : U',
PRIMARY KEY (`id`)
) ENGINE=InnoDB;
-- ----------------------------