Skip to content

Instantly share code, notes, and snippets.

View mesuutt's full-sized avatar

Mesut Taşçı mesuutt

View GitHub Profile
;(function ( $, window, undefined ) {
/*
Handle data layer of the tables.
*/
var CustomDataView = function(options) {
$.extend(this.defaults, options);
}
CustomDataView.prototype = {
data: {}
@mesuutt
mesuutt / djang-tables2-base-table.html
Last active August 29, 2015 13:56
Bootstrap style table. Fixed several bugs related pagination and column sorting.
{% spaceless %}
{% load django_tables2 %}
{% load i18n %}
<div class="grid">
<div class="grid-title">
<div class="pull-left">
<div class="icon-title"><i class="icon-eye-open"></i></div>
<span>{{ table.Meta.title }}</span>
<div class="clearfix"></div>
#python
#pyistanbul
#django
#jstanbul
#gsoc
#vagrant
#archlinux-tr
@mesuutt
mesuutt / sublime.md
Last active December 12, 2015 04:28
Komut Açıklama
\G Sonuçları dikey gösterme
> show tables Tabloları listele
> SHOW TABLE STATUS LIKE 'tablename' \G Tablo hakkında detaylı bilgi
> pager less Bu komutu bir defa çalıştırdıktan sonra output artık lesse aktarılır
@mesuutt
mesuutt / ilceler.sql
Last active December 14, 2015 20:28
Türkiye ilçeler Son güncelleme: 14.04.2013
CREATE TABLE IF NOT EXISTS `tr_province` (
`id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
`city_id` int(11) NOT NULL,
`name` varchar(50) NOT NULL,
UNIQUE KEY `id_town` (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=964 ;
--
-- Tablo döküm verisi `tr_province`
--
@mesuutt
mesuutt / iller.sql
Last active December 14, 2015 20:29
Türkiye iller - 01.06.2012
CREATE TABLE IF NOT EXISTS `tr_city` (
`id` int(3) NOT NULL,
`name` varchar(50) NOT NULL,
UNIQUE KEY `id_town` (`id`)
);
INSERT INTO `tr_city` (`id`, `name`) VALUES
(1, 'Adana'),
@mesuutt
mesuutt / Flake8Lint.sublime-settings
Last active December 15, 2015 10:38
Sublime text 2 Settings
{
"pep8_max_line_length": 120,
"ignore": ["E128"]
}
@mesuutt
mesuutt / tmux.md
Last active December 30, 2015 03:09

Not: Bu kısayollar benim tmux.conf'umda ayarlanan kısa yollardır. Default bir tmux.conf konfigürasyonunda bu kısayollar farklık gösterebilir.

Kendi .tmux.conf dosyam

CK Kontrol key anlamına gelir.Default'ta Ctrl+b'dir.


Pencere ve Paneler

@mesuutt
mesuutt / middleware.py
Last active January 2, 2016 20:19 — forked from strogonoff/middleware.py
Django middleware for cross-domain XHR. WARNING: Defaults are unsafe here. Make sure to set proper restrictions in production!
from django import http
class XsSharing(object):
"""
This middleware allows cross-domain XHR using the html5 postMessage API.
Access-Control-Allow-Origin: http://foo.example
Access-Control-Allow-Methods: POST, GET, OPTIONS, PUT, DELETE