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 / gradient.css
Created October 3, 2018 19:40
CSS Gradient Animation
background: linear-gradient(231deg, #1a1a1a, #000000);
background-size: 400% 400%;
-webkit-animation: AnimationName 15s ease infinite;
-moz-animation: AnimationName 15s ease infinite;
animation: AnimationName 15s ease infinite;
@-webkit-keyframes AnimationName {
0%{background-position:0% 51%}
50%{background-position:100% 50%}
@melihkocaturk
melihkocaturk / asynchronous-javascript-sdk.html
Last active March 24, 2017 14:47
Asynchronous JavaScript SDK
<div id="fb-root"></div>
<script>
window.fbAsyncInit = function() {
FB.init({
appId : '[Your Application ID]',
xfbml : true,
version: 'v2.2'
});
};
@melihkocaturk
melihkocaturk / basic-javascript-sdk.html
Last active March 24, 2017 14:47
Basic JavaScript SDK
<div id="fb-root"></div>
<script>(function(d, s, id) {
var js, fjs = d.getElementsByTagName(s)[0];
if (d.getElementById(id)) return;
js = d.createElement(s); js.id = id;
js.src = "//connect.facebook.net/en_US/sdk.js#xfbml=1&amp;version=v2.2";
fjs.parentNode.insertBefore(js, fjs);
}(document, 'script', 'facebook-jssdk'));</script>
@melihkocaturk
melihkocaturk / gist:b56508b85157d4342444f66700953321
Last active April 30, 2022 21:08
Türkiye Şehir Listesi SQL Tablosu
CREATE TABLE `cities` (
`id` Int( 11 ) AUTO_INCREMENT NOT NULL,
`name` VarChar( 255 ) CHARACTER SET utf8 COLLATE utf8_unicode_ci NULL,
PRIMARY KEY ( `id` ) )
CHARACTER SET = utf8
COLLATE = utf8_unicode_ci
ENGINE = InnoDB
AUTO_INCREMENT = 82;
INSERT INTO `cities` (`id`,`name`) VALUES ( 1,'Adana' );
@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;
-- ----------------------------