Skip to content

Instantly share code, notes, and snippets.

View etolstoy's full-sized avatar
🥦

Egor Tolstoy etolstoy

🥦
View GitHub Profile
@import UIKit;
NS_ASSUME_NONNULL_BEGIN
@protocol MFBPreviewableCollectionView
- (nullable NSIndexPath *)mfb_previewableCollectionIndexPathForItemAtPoint:(CGPoint)point;
- (CGRect)mfb_previewableCollectionItemRectForIndexPath:(NSIndexPath *)indexPath;
@tywhang
tywhang / README.md
Last active August 18, 2022 22:20
Easily add Charts into Dashing with Chartjs (Line, Bar, Radar, Polar Area, Pie, Doughnut)

smashing-chartjs

An easy interface to use all of chartjs.org's charts.

Inspired by my own pain and suffering of trying to add a simple chart to smashing

Make awesome charts like these:

@DevAlloy
DevAlloy / gist:8fce1f9df877b621bd1a
Created October 7, 2015 17:54
Инструкция как сгенерировать obfuscatedSecretKey[] из своей строки
// Как сгенерировать obfuscatedSecretKey[] из uuid, который мы хотим захардкодить
- (void)generateString {
/**
* @author Цыганов Станислав
*
* Шаг 1. Получаем hex-овый массив
*/
NSString *myString = @"Hello";
@DevAlloy
DevAlloy / uuidForToken
Created October 7, 2015 17:53
Алгоритм генерации строки, которую хотим спрятать
- (NSString *)uuidForToken {
unsigned char obfuscatedSecretKey[] = {0xa, 0xd7, 0x55, 0x2f, 0x94};
// Get the SHA1 of a class name, to form the obfuscator.
unsigned char obfuscator[CC_SHA1_DIGEST_LENGTH];
NSData *className = [NSStringFromClass([self class])
dataUsingEncoding:NSUTF8StringEncoding];
CC_SHA1(className.bytes, (CC_LONG)className.length, obfuscator);
@a-know
a-know / README.md
Last active October 13, 2022 07:03
!! Deprecated !! - Get and Show cell's value from Google Spreadsheet Widget for Dashing

Description

Get and Show cell's value from Google Spreadsheet Widget for Dashing.

Dependency

  • gem 'google-api-client'
  • gem 'google_drive'

Installation

dashing install e0ad37c2e137d2da0916