Skip to content

Instantly share code, notes, and snippets.

View azimin's full-sized avatar
🚀
A new project is coming

Alexander Zimin azimin

🚀
A new project is coming
View GitHub Profile
@azimin
azimin / FoundrySignUtilities.sol
Created October 1, 2022 17:19
Ability to generate signature for solidity tests in foundry
// SPDX-License-Identifier: MIT
pragma solidity >=0.8.0;
import "forge-std/Test.sol";
import {ERC721} from "solmate/tokens/ERC721.sol";
import {ECDSA} from "openzeppelin/contracts/utils/cryptography/ECDSA.sol";
contract ERC721AirdropWithSign is ERC721 {
address public signer;
@azimin
azimin / ETH Gas to USD [Raycast]
Created October 5, 2021 10:11
Covert given ETH Gas to USD using current average Gas price
#!/bin/bash
# Required parameters:
# @raycast.schemaVersion 1
# @raycast.title Gas to USD
# @raycast.mode compact
# Optional parameters:
# @raycast.icon images/ethereum-logo.png
# @raycast.argument1 { "type": "text", "placeholder": "Gas" }
Because this is class method, `new` reserved by Obj-C word and `RatingsFlow` is part of class name.
@azimin
azimin / iOS Community
Created August 4, 2017 12:03
iOS Community
ios-channels.ru
digest.mbltdev.ru
bit.ly/podlodka_podcast
vk.com/iosdevcourse
iosgoodreads.ru
vk.com/iosninja
peerlab.community
cocoadevelopers.club
@azimin
azimin / [Quiz] CocoaHeads Russia, Moscow, March 2017
Created April 21, 2017 11:27
Quiz from CocoaHeads Russia meeting in Moscow (March 2017)
CocoaHeads Russia, Moscow, March 2017
Пожалуйста указывайте авторство
Все вопросы, жалобы и уточнения можно на писать мне в одной из социальных сетей:
https://vk.com/azimin
https://twitter.com/ziminalex
https://facebook.com/AllZimin
#1 Что неправда про метод `viewDidUnload`?
@azimin
azimin / [Quiz] CocoaHeads Russia, Moscow, January 2017
Last active October 31, 2017 12:03
Quiz from CocoaHeads Russia meeting in Moscow (January 2017)
CocoaHeads Russia, Moscow, January 2017
Пожалуйста указывайте авторство
Все вопросы, жалобы и уточнения можно на писать мне в одной из социальных сетей:
https://vk.com/azimin
https://twitter.com/ziminalex
https://facebook.com/AllZimin
#1 В какой группе хотя бы один параметр не являются валидным для #if os()?
@azimin
azimin / search.applescript
Last active December 23, 2016 23:02
Search file for "Header Search Paths"
property fileToSearch : "UCSongTrainerRenderingController.h"
property finalPath : ""
set finalPath to do shell script ("mdfind -name " & fileToSearch & " -onlyin /")
set finalPath to replace_chars(finalPath, "/Users/azimin/iOSDeveloper/Uberchord-iOS", "$(PROJECT_DIR)")
set finalPath to replace_chars(finalPath, "/" & fileToSearch, "")
set finalPath to replace_chars(finalPath, " ", "\\ ")
set the clipboard to finalPath
on replace_chars(this_text, search_string, replacement_string)
@azimin
azimin / [Quiz] CocoaHeads Russia, St. Petersburg, December 2016
Last active December 24, 2017 15:50
Quiz from CocoaHeads Russia meeting in Saint Petersburg (December 2016)
CocoaHeads Russia December Quiz
Пожалуйста указывайте авторство
Все вопросы, жалобы и уточнения можно на писать мне в одной из социальных сетей:
https://vk.com/azimin
https://twitter.com/ziminalex
https://facebook.com/AllZimin
Ответы в конце файла.
@azimin
azimin / AZTextFrame.swift
Created November 27, 2016 19:14
Helper for calculating String and NSAttributedString frame
import UIKit
class AZTextFrameAttributes: NSObject {
// MARK: - Properties
fileprivate(set) var width: CGFloat = 0
fileprivate(set) var string: String?
fileprivate(set) var attributedString: NSAttributedString?
@azimin
azimin / prepare-commit-msg
Created November 8, 2016 15:20
prepare-commit-msg that take part of branch name
#!/bin/sh
#
# An example hook script to prepare the commit log message.
# Called by "git commit" with the name of the file that has the
# commit message, followed by the description of the commit
# message's source. The hook's purpose is to edit the commit
# message file. If the hook fails with a non-zero status,
# the commit is aborted.
#