Skip to content

Instantly share code, notes, and snippets.

View eiskrenkov's full-sized avatar
💭
Getting in madness

Egor Iskrenkov eiskrenkov

💭
Getting in madness
View GitHub Profile
@eiskrenkov
eiskrenkov / benchmark_active_record_connection_handler_public_api.rb
Last active November 22, 2023 18:21
Benchmark Active Record Connection Handler before and after optimisation done to how deprecation messages are built
# frozen_string_literal: true
require "bundler/inline"
using_patch = ENV["USING_PATCH"]
gemfile(true) do
source "https://rubygems.org"
git_source(:github) { |repo| "https://github.com/#{repo}.git" }
#!/usr/bin/env ruby
# Example Usage
#
# ruby ~/Desktop/photos.rb prepare 15/04/2023,16/04/2023 --extension=jpg
#
require 'bundler/inline'
gemfile do
@eiskrenkov
eiskrenkov / rails-remote-runner-test.rb
Last active March 21, 2023 14:14
rails-remote-runner-test.rb
puts Rails.application.class.name
sleep 3
puts 1
sleep 3
puts 2
@eiskrenkov
eiskrenkov / git_aliases.zsh
Last active May 29, 2019 16:48
Oh My Zsh most used git aliases
alias gra='git remote add'
alias grrm='git remote remove'
alias ga='git add'
alias gst='git status'
alias ggpush='git push origin "$(git_current_branch)"'
alias gpf!='git push --force'
alias gl='git pull'
alias gc='git commit -v'
@eiskrenkov
eiskrenkov / Currencies.plist
Last active April 21, 2019 13:21
List of world currencies in the property list format. Source: https://en.wikipedia.org/wiki/List_of_circulating_currencies
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<array>
<dict>
<key>name</key>
<string>AED</string>
<key>symbol</key>
<string>Dh</string>
</dict>
@eiskrenkov
eiskrenkov / MySublimeConfig.sublime-settings
Last active July 6, 2019 09:11
My config file for the Sublime Text
{
"color_scheme": "Packages/Darkula Color Scheme/darkula.tmTheme",
"font_size": 10,
"ignored_packages": ["Vintage"],
"theme": "Adaptive.sublime-theme",
"rulers": [120],
"tab_size": 2,
"translate_tabs_to_spaces": true,
"always_show_minimap_viewport": true,
@eiskrenkov
eiskrenkov / CoreDataPreloading.swift
Last active February 25, 2019 20:21
Preloading data from plist containing array of dictionaries to CoreData
private func preloadData() {
let preloadedDataKey = "didPreloadData"
let userDefaults = UserDefaults.standard
if userDefaults.bool(forKey: preloadedDataKey) == false {
guard let dataPath = Bundle.main.url(forResource: "PlistName", withExtension: "plist") else {
return
}
let backgroundContext = persistentContainer.newBackgroundContext()