This file contains hidden or 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
# frozen_string_literal: true | |
require "bundler/inline" | |
gemfile(false) do | |
source "https://rubygems.org" | |
git_source(:github) { |repo| "https://github.com/#{repo}.git" } | |
gem "activerecord", github: "rails/rails" | |
gem 'benchmark-ips' |
This file contains hidden or 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
045187663187b475992e14e7a90c31ae9242973ec075dd252e27dc663db11de58926316eaadd4e7bbee9a31adcabf5fdf2c070b5957900b77baaabd43705e7282a;atesgoral |
This file contains hidden or 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 hello | |
"world" | |
end | |
puts "hello #{hello}" |
This file contains hidden or 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
### Keybase proof | |
I hereby claim: | |
* I am paracycle on github. | |
* I am ufuk (https://keybase.io/ufuk) on keybase. | |
* I have a public key whose fingerprint is E873 99AE 418B 02F8 E23A F5D6 A2A0 E7D7 D418 DEBB | |
To claim this, I am signing this object: |
This file contains hidden or 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
[ | |
{"binNumber": "400684", "bankName": "ING Bank A.Ş.", "cardBrand": "Bonus", "bankCode": "099"}, | |
{"binNumber": "401622", "bankName": "YAPI ve KREDİ BANKASI A.Ş.", "cardBrand": "World", "bankCode": "067"}, | |
{"binNumber": "401738", "bankName": "GARANTİ BANKASI A.Ş.", "cardBrand": "Bonus", "bankCode": "062"}, | |
{"binNumber": "402275", "bankName": "ASYA KATILIM BANKASI A.Ş.", "cardBrand": "Asya", "bankCode": "208"}, | |
{"binNumber": "402276", "bankName": "ASYA KATILIM BANKASI A.Ş.", "cardBrand": "Asya", "bankCode": "208"}, | |
{"binNumber": "402277", "bankName": "FİNANSBANK A.Ş.", "cardBrand": "CardFinans", "bankCode": "111"}, | |
{"binNumber": "402278", "bankName": "FİNANSBANK A.Ş.", "cardBrand": "CardFinans", "bankCode": "111"}, | |
{"binNumber": "402280", "bankName": "ASYA KATILIM BANKASI A.Ş.", "cardBrand": "Asya", "bankCode": "208"}, | |
{"binNumber": "402458", "bankName": "TÜRK EKONOMİ BANKASI TEB A.Ş.", "cardBrand": "Bonus", "bankCode": "032"}, |
This file contains hidden or 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 self.validate_tckn(tckn) | |
return false if invalid_value?(tckn, 11) | |
digits = tckn[0..-3].each_char.map(&:to_i).each_with_index | |
# Accumulate the check for both the last digit and the one-from-last | |
# digit in the same loop. So reduce takes a two element array as memo | |
# and returns the updated two element array at each iteration. | |
first, last = | |
digits.reduce([0, 0]) do |memo, (digit, idx)| |
This file contains hidden or 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
namespace :load do | |
task :defaults do | |
set :sidekiq_timeout , -> { 10 } | |
set :sidekiq_role , -> { :app } | |
set :sidekiq_pid , -> { "#{current_path}/tmp/pids/sidekiq.pid" } | |
set :sidekiq_processes , -> { 1 } | |
set :rbenv_map_bins , fetch(:rbenv_map_bins).concat(%w(sidekiq sidekiqctl)) | |
end | |
end |
This file contains hidden or 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 TcknValidator < ActiveModel::EachValidator | |
def validate_each(record, attribute, value) | |
unless validate_tckn(value) | |
record.errors.add(attribute, options[:message] || :invalid) | |
end | |
end | |
protected | |
def validate_tckn(tckn) | |
digits = tckn[0..8].each_char.map(&:to_i).each_with_index |
This file contains hidden or 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
- { bin: 413226, banka_kodu: 10 , banka_adi: T.C. ZİRAAT BANKASI A.Ş. , type: VISA , subtype: PLATINUM , virtual: false , prepaid: false } | |
- { bin: 444676, banka_kodu: 10 , banka_adi: T.C. ZİRAAT BANKASI A.Ş. , type: VISA , subtype: CLASSIC , virtual: false , prepaid: false } | |
- { bin: 444677, banka_kodu: 10 , banka_adi: T.C. ZİRAAT BANKASI A.Ş. , type: VISA , subtype: GOLD , virtual: false , prepaid: false } | |
- { bin: 444678, banka_kodu: 10 , banka_adi: T.C. ZİRAAT BANKASI A.Ş. , type: VISA , subtype: PLATINUM , virtual: false , prepaid: false } | |
- { bin: 453955, banka_kodu: 10 , banka_adi: T.C. ZİRAAT BANKASI A.Ş. , type: VISA , subtype: CLASSIC , virtual: false , prepaid: false } | |
- { bin: 453956, banka_kodu: 10 , banka_adi: T.C. ZİRAAT BANKASI A.Ş. , type: VISA , subtype: GOLD , virtual: false , prepaid: false } | |
- { bin: 454671, banka_kodu: 10 , banka_adi: T.C. ZİRAAT B |
This file contains hidden or 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
-- Clear tables | |
DROP TABLE chat_list; | |
DROP TABLE messages; | |
-- Create new tables | |
CREATE TABLE chat_list (_id INTEGER PRIMARY KEY AUTOINCREMENT, key_remote_jid TEXT UNIQUE, message_table_id INTEGER); | |
CREATE TABLE messages (_id INTEGER PRIMARY KEY AUTOINCREMENT, key_remote_jid TEXT NOT NULL, key_from_me INTEGER, key_id TEXT NOT NULL, status INTEGER, needs_push INTEGER, data TEXT, timestamp INTEGER, media_url TEXT, media_mime_type TEXT, media_wa_type TEXT, media_size INTEGER, media_name TEXT, latitude REAL, longitude REAL, thumb_image TEXT, remote_resource TEXT, received_timestamp INTEGER, send_timestamp INTEGER, receipt_server_timestamp INTEGER, receipt_device_timestamp INTEGER, raw_data BLOB, media_hash TEXT, recipient_count INTEGER, media_duration INTEGER, origin INTEGER); | |
-- Attach Android and iPhone databases | |
ATTACH 'msgstore.db' AS android; |
NewerOlder