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
tr: | |
admin: | |
home: | |
name: "Anasayfa" | |
pagination: | |
previous: "« Önceki" | |
next: "Sonraki »" | |
truncate: "…" | |
misc: | |
filter_date_format: "dd/mm/yy" # a combination of 'dd', 'mm' and 'yy' with any delimiter. No other interpolation will be done! |
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
/// <summary> | |
/// Generates a permalink slug for passed string | |
/// </summary> | |
/// <param name="phrase"></param> | |
/// <returns>clean slug string (ex. "some-cool-topic")</returns> | |
public static string GenerateSlug(this string phrase) | |
{ | |
var s = phrase.RemoveAccent().ToLower(); | |
s = Regex.Replace(s, @"[^a-z0-9\s-]", ""); // remove invalid characters | |
s = Regex.Replace(s, @"\s+", " ").Trim(); // single space |
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
# ... | |
gem 'sidekiq' | |
gem 'slim' | |
gem 'unicorn' | |
# ... |
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
if [ -f "$rvm_path/scripts/rvm" ]; then | |
source "$rvm_path/scripts/rvm" | |
if [ -f ".rvmrc" ]; then | |
source ".rvmrc" | |
fi | |
if [ -f ".ruby-version" ]; then | |
rvm use `cat .ruby-version` | |
fi |
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; |
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
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
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
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)| |
OlderNewer