This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sudo -u postgres psql | |
-- show running queries | |
SELECT pid, age(clock_timestamp(), query_start), usename, query FROM pg_stat_activity WHERE query != '<IDLE>' AND query NOT ILIKE '%pg_stat_activity%' ORDER BY query_start desc; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
static void LogPrint(Object object) async { | |
int defaultPrintLength = 1020; | |
if (object.toString().length <= defaultPrintLength) { | |
print(object); | |
} else { | |
String log = object.toString(); | |
int start = 0; | |
int endIndex = defaultPrintLength; | |
int logLength = log.length; | |
int tmpLogLength = log.length; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Release | |
$ keytool -genkey -v -keystore KEY_NAME.jks -alias ALIAS_NAME -keyalg RSA -keysize 2048 -validity 10000 | |
# Debug | |
$ keytool -genkey -v -keystore debug.keystore -storepass android -alias androiddebugkey -keypass android -keyalg RSA -keysize 2048 -validity 10000 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class ValidatorsTestCase(unittest.TestCase): | |
def setUp(self): | |
print('- Test verileri hazırlanıyor...') | |
self.valid_emails = [ | |
'[email protected]', | |
'[email protected]', | |
'[email protected]', | |
] | |
def tearDown(self): |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import unittest | |
from validators import validate_email | |
class ValidatorsTestCase(unittest.TestCase): | |
def test_validate_email(self): | |
# Bu format kesinlikle doğru. | |
self.assertTrue(validate_email('[email protected]')) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import unittest | |
from validators import validate_email | |
class ValidatorsTestCase(unittest.TestCase): | |
def test_validate_email(self): | |
self.assertTrue(validate_email('[email protected]')) | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def validate_email(address): | |
import re | |
return bool(re.match(r'[^@]+@[^@]+\.[^@]+', address)) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
print('Onay kodu gönderildi: *** *** ** *{}'.format( | |
phone_number[len(phone_number)] | |
)) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@benchmark | |
@sleep(3) | |
class User(object): | |
is_active = True | |
def __init__(self, name, permissions): | |
self.name = name | |
self.permissions = permissions | |
user = User('umutcoskun', ['can_view_dashboard']) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@sleep(5) | |
def hello(name): | |
print('Hello {}'.format(name)) | |
hello('World') | |
hello('Umut') |
NewerOlder