Skip to content

Instantly share code, notes, and snippets.

0x006b75a92492b812110dcd6dac5beb9d507c486b560bdfa03f2a202685a41d90

disabled_rules:
- trailing_whitespace
- file_length
- function_body_length
- function_parameter_count
- type_body_length
- line_length
- large_tuple
- nesting
- cyclomatic_complexity
@grachyov
grachyov / tokenary_detect.js
Created March 29, 2019 20:32
Detecting Tokenary extension
window.addEventListener('load', async () => {
checkProvider()
});
function checkProvider() {
if (window.ethereum) {
if (window.ethereum.isTokenary) {
// Update UI
}

Keybase proof

I hereby claim:

  • I am grachyov on github.
  • I am grachyov (https://keybase.io/grachyov) on keybase.
  • I have a public key ASDDnjzCHnlzmA4tvkGPpeBYf1U4-lCwfziygcmnuisbbAo

To claim this, I am signing this object:

@grachyov
grachyov / generate-iOS-app-icons.sh
Created April 4, 2016 18:58 — forked from marcuswestin/generate-iOS-app-icons.sh
Generate all xcode 5 app icon sizes from one original large icon
mkdir -p generated
sips -Z 29 --out generated/iPhoneSettings-29x29.png sourceIcon.png
sips -Z 58 --out generated/iPhoneSettings-29x29@2x.png sourceIcon.png
sips -Z 80 --out generated/iPhoneSpotlight-40x40@2x.png sourceIcon.png
sips -Z 120 --out generated/iPhoneApp-60x60@2x.png sourceIcon.png
sips -Z 29 --out generated/iPadSettings-29x29.png sourceIcon.png
sips -Z 58 --out generated/iPadSettings-29x29@2x.png sourceIcon.png
sips -Z 40 --out generated/iPadSpotlight-40x40.png sourceIcon.png
//
// UIDeviceHardware.h
//
// Used to determine EXACT version of device software is running on.
#import <Foundation/Foundation.h>
@interface UIDeviceHardware : NSObject
- (NSString *) platform;
@grachyov
grachyov / IconsGenerator
Created January 3, 2015 19:20
Generates @1x @2x and @3x iOS icons
sips -Z 29 --out 29.png icon.png
sips -Z 58 --out 29@2x.png icon.png
sips -Z 87 --out 29@3x.png icon.png
sips -Z 40 --out 40.png icon.png
sips -Z 80 --out 40@2x.png icon.png
sips -Z 120 --out 40@3x.png icon.png
sips -Z 120 --out 60@2x.png icon.png
sips -Z 180 --out 60@3x.png icon.png