Skip to content

Instantly share code, notes, and snippets.

View tkalimov's full-sized avatar

Timur Kalimov tkalimov

View GitHub Profile
@tkalimov
tkalimov / fx_rates.json
Created April 15, 2025 13:32
FX rates endpoint
{
"data": {
"conversionRates": {
"types": [
{
"rates": [
{
"baseBuyRate": "1.394154",
"baseSellRate": "1.382767",
"buyRate": "1.415385",
Accepted Value Normalized Value
JA JANUARY
JAN JANUARY
JANU JANUARY
JANUA JANUARY
JANUAR JANUARY
JANUARY JANUARY
F FEBRUARY
FE FEBRUARY
FEB FEBRUARY
@tkalimov
tkalimov / gist:b3f43e7eb9a57ea4d67c
Created October 16, 2014 18:21
Calculating average user article activity
require 'maintenance'
maintenance = DatabaseMaintainer.new()
maintenance.destroy_duplicate_articles if options["destroy_duplicate_articles"]
maintenance.destroy_duplicate_logs if options["destroy_duplicate_logs"]
maintenance.fix_reading_logs_counter
users = User.where("reading_logs_count > ? AND claimed_profile = ?", 0, true)
reading_log_count_array = users.pluck(:reading_logs_count)
average_per_user = reading_log_count_array.inject{ |sum, el| sum + el }.to_f / reading_log_count_array.size
// Go to menue:
// find->find in files
// Switch on reg_ex button
// Find:
^(.*)$
// Where:
c:\your_folder\,*.php,*.phtml,*.js,*.inc,*.html, -*/folder_to_exclude/*
// Then click on the find button
// Be careful to not click on Replace!!!