Skip to content

Instantly share code, notes, and snippets.

View ArtemisKS's full-sized avatar
🎸
Enjoying higher culture

Artemiy Kupriianets ArtemisKS

🎸
Enjoying higher culture
  • New York
View GitHub Profile
@ArtemisKS
ArtemisKS / UIView.swift
Created September 4, 2019 09:04
useful extension for uiview
extension UIView {
enum GlowEffect: Float {
case small = 0.4, normal = 2, big = 15
}
func pulsate(with duration: Double = 0.2) {
let pulse = CASpringAnimation(keyPath: "transform.scale")
pulse.duration = duration
pulse.fromValue = 0.98
@ArtemisKS
ArtemisKS / Useful_utils.swift
Last active September 24, 2019 13:24
Useful swift & objective c utils
private func getAddressString(
addressName: String?,
estLength: Int) -> String {
if var addr = addressName {
addr = "\n\"\(addr)\""
let len = addr.count - 1
if len > estLength {
let offset = len/(len/(estLength/2))
for i in stride(from: 0, to: addr.count, by: offset) {
let iter = i/offset
@ArtemisKS
ArtemisKS / .zshrc
Last active February 19, 2020 10:58 — forked from Millon15/.zshrc
# If you come from bash you might have to change your $PATH.
# export PATH=$HOME/bin:/usr/local/bin:$PATH
# Path to your oh-my-zsh installation.
export ZSH=$HOME/.oh-my-zsh
# Set name of the theme to load. Optionally, if you set this to "random"
# it'll load a random theme each time that oh-my-zsh is loaded.
# See https://github.com/robbyrussell/oh-my-zsh/wiki/Themes
ZSH_THEME="robbyrussell"
@ArtemisKS
ArtemisKS / lifehacks.c
Last active February 14, 2019 15:49
little c lifehacks
int add(int x, int y)
{
if (y == 0)
return x;
else
return add( x ^ y, (x & y) << 1);
}
#define ARRLEN(x) (sizeof (x) / sizeof (*x))
@ArtemisKS
ArtemisKS / bash-colors.md
Created November 8, 2018 18:31 — forked from iamnewton/bash-colors.md
The entire table of ANSI color codes.

Regular Colors

Value Color
\e[0;30m Black
\e[0;31m Red
\e[0;32m Green
\e[0;33m Yellow
\e[0;34m Blue
\e[0;35m Purple