Skip to content

Instantly share code, notes, and snippets.


Mesut Taşçı mesuutt

Block or report user

Report or block mesuutt

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View nested_scroll_demo.dart
import 'package:flutter/material.dart';
void main() async {
runApp(new TestApp());
class TestApp extends StatelessWidget {
Widget build(BuildContext context) {
View nested_scroll_view.dart
// Copyright 2017, the Flutter project authors. Please see the AUTHORS file
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
import 'package:flutter/material.dart';
void main() {
runApp(new TestApp());
mesuutt / format-money.dart
Last active Feb 11, 2019
Format money as Turkish money format in dart language
View format-money.dart
String formatMoney(dynamic text) {
if (text is num){
text = text.toStringAsFixed(2);
return text
.replaceAllMapped(RegExp(r"(\d)(?=(\d{3})+\.)"), (m) => "${}.")
.replaceAllMapped(RegExp(r"\.(\d+)$"), (m) => ",${}");
mesuutt /
Last active Oct 25, 2018
Django save file to storage & Read from storage without model
from import default_storage
# Saving POST'ed file to storage
file = request.FILES['myfile']
filename =, file)
# Reading file from storage
file =
mesuutt /
Last active Feb 27, 2018
Kullanisli Postgresql Sorgulari
mesuutt / ajax-setup.js
Last active Feb 25, 2018
Django handling expired session (for ajax request)
View ajax-setup.js
complete: function(xhr, status) {
if(xhr.status == 278) {
if (xhr.responseJSON) {
var data = xhr.responseJSON;
if (!data.success && data.error_message) {
mesuutt / city.json
Last active Jan 21, 2018
Django projeleri için il-ilçe fixtureları ve modeli (İl id'leri plaka kodlarıdır)
View city.json
"model": "",
"pk": 1,
"fields": {
"name": "ADANA"
"model": "",
View gist:757e1f1e892f0eff63e6e5c50e2541d7
DELETE = "delete"
UPDATE = "update"
SELECT = "select"
INSERT = "insert"
QUOTE = "'"
def format_parameter(parameter, value):
return "%s = %s" % (parameter, determine_quote(value))
mesuutt /
Last active Aug 23, 2017
Custom form widget for add additional attributes to option tags of select on Django forms.
from django import forms
from django.utils.encoding import force_text
from django.utils.html import format_html
from django.utils.safestring import mark_safe
class SelectOptionsWithAttrs(forms.widgets.Select):
def render_options(self, selected_choices):
# Normalize to strings.
selected_choices = set(force_text(v) for v in selected_choices)
mesuutt /
Last active Mar 7, 2018
Show BTC,ETH and LTC exchange rates without leaving commandline.
import re
import sys
import getopt
from datetime import datetime, timedelta
from decimal import Decimal
import requests
GREEN = '\033[0;32m'
RED = '\033[0;31m'
MAGENTA = '\033[0;35m'
You can’t perform that action at this time.