Skip to content

Instantly share code, notes, and snippets.

View vol1ura's full-sized avatar
:octocat:
more open source

Yuriy Volodin vol1ura

:octocat:
more open source
  • Moscow
View GitHub Profile
# https://core.telegram.org/widgets/login
require 'openssl'
require 'uri'
BOT_API_KEY = '1234567:asdfasdf'
SECRET_KEY = OpenSSL::Digest::SHA256.digest BOT_API_KEY
HASH_EXPIRATION_TIME = 60 * 60
def validate_auth(params_string)
@vol1ura
vol1ura / base.rb
Created May 14, 2022 17:50
A simple "replacement" for `grape-entity` gem for small API projects. Allows you to create custom classes, inherit from them and get representations of both individual objects and their collections.
# frozen_string_literal: true
module Entities
# Fabric class to build object representation classes
class Base
def self.represent(...)
new(...).represent
end
def self.represent_collection(collection, options = {})
@vol1ura
vol1ura / clubmates.ipynb
Created December 25, 2021 21:03
clubmates_engirunners.ipynb
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@vol1ura
vol1ura / clubmates.ipynb
Last active December 26, 2021 09:56
clubmates.ipynb
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@vol1ura
vol1ura / zsh_manual.md
Last active July 3, 2021 10:11
How to install and configure zsh

How to install and configure zsh

Install on Ubuntu

  1. Install package
$ sudo apt install zsh
  1. Set zsh as a default shell
@vol1ura
vol1ura / all_parkrun_runners.ipynb
Created May 12, 2021 20:53
All_Parkrun_Runners.ipynb
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.