Skip to content

Instantly share code, notes, and snippets.

View muratcorlu's full-sized avatar

Murat Çorlu muratcorlu

View GitHub Profile
"""
Kullanici kayit islemlerinden gelen mesajlari dinleyen,
mesaj geldiginde ilgili kullanicinin bulundugu yeri veritabanindan cekme,
kullanicinin bulundugu bu yere yakin diger kullanicilari cekme,
ve bulunan diger kullanicilara e-posta gonderme islemlerini
simule eden kod
http://barryp.org/software/py-amqplib/ adresinden py-amqplib'i indirip kurmalisiniz
"""
@vicalejuri
vicalejuri / django-crossdomainxhr-middleware.py
Created June 5, 2010 17:47
Middlware to allow's your django server to respond appropriately to cross domain XHR (postMessage html5 API).
import re
from django.utils.text import compress_string
from django.utils.cache import patch_vary_headers
from django import http
try:
import settings
XS_SHARING_ALLOWED_ORIGINS = settings.XS_SHARING_ALLOWED_ORIGINS
// selectorSupported lovingly lifted from the mad italian genius, diego perini
// http://javascript.nwbox.com/CSSSupport/
function selectorSupported(selector){
var support, link, sheet, doc = document,
root = doc.documentElement,
head = root.getElementsByTagName('head')[0],
impl = doc.implementation || {
@adammiller
adammiller / douglasPeucker.js
Created February 14, 2011 16:54
Javascript implementation of the Douglas Peucker path simplification algorithm
var simplifyPath = function( points, tolerance ) {
// helper classes
var Vector = function( x, y ) {
this.x = x;
this.y = y;
};
var Line = function( p1, p2 ) {
this.p1 = p1;
@140bytes
140bytes / LICENSE.txt
Created May 9, 2011 16:13
140byt.es -- Click ↑↑ fork ↑↑ to play!
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
Version 2, December 2004
Copyright (C) 2011 YOUR_NAME_HERE <YOUR_URL_HERE>
Everyone is permitted to copy and distribute verbatim or modified
copies of this license document, and changing it is allowed as long
as the name is changed.
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
@barneycarroll
barneycarroll / detectCSS.js
Created July 21, 2011 08:23
Simple function to determine whether a given CSS property is supported or not. Useful for conditional execution of JS animations, rounded corners, etc.
// Is the passed CSS property supported?
// eg. detectCSS('transition')
function detectCSS(prop){
var
prop = prop.replace(/-(\w)/g,function(s,g){return g.toUpperCase()}),
pre = ',Icab,Khtml,Moz,Ms,O,Webkit'.split(',');
for (var i = 0; i < pre.length; ++i){
if(i==1)
prop = prop.slice(0,1).toUpperCase() + prop.slice(1);
@ismailbaskin
ismailbaskin / turkce_isimler.sql
Last active March 31, 2024 03:45
Türkçe isim veritabanı
-- Turkce isimler sozlugu twitter : http://twitter.com/baskindev
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;
-- ----------------------------
@kevinSuttle
kevinSuttle / meta-tags.md
Last active March 31, 2024 14:26 — forked from lancejpollard/meta-tags.md
List of Usable HTML Meta and Link Tags
@jlong
jlong / uri.js
Created April 20, 2012 13:29
URI Parsing with Javascript
var parser = document.createElement('a');
parser.href = "http://example.com:3000/pathname/?search=test#hash";
parser.protocol; // => "http:"
parser.hostname; // => "example.com"
parser.port; // => "3000"
parser.pathname; // => "/pathname/"
parser.search; // => "?search=test"
parser.hash; // => "#hash"
parser.host; // => "example.com:3000"
@ismailbaskin
ismailbaskin / postakodu.sql
Created April 24, 2012 05:06
İl - İlçe - semt - mahalle - posta kodu veritabanı
This file has been truncated, but you can view the full file.
DROP TABLE IF EXISTS `pk_il`;
CREATE TABLE `pk_il` (
`il_id` int(2) NOT NULL COMMENT 'plaka kodu',
`il_adi` varchar(255) NOT NULL,
PRIMARY KEY (`il_id`),
KEY `il_adi` (`il_adi`) USING BTREE
) ENGINE=MyISAM;
-- ----------------------------
INSERT INTO `pk_il` VALUES ('1', 'ADANA');