I hereby claim:
- I am leoschweizer on github.
- I am leoschweizer (https://keybase.io/leoschweizer) on keybase.
- I have a public key ASA2lMRDCAbzeGKYw86iqDtn-nTuhxBzbYWw7pU4tRGbeQo
To claim this, I am signing this object:
| require 'net/http' | |
| require 'json' | |
| require 'uri' | |
| SCHEDULER.every '5s', allow_overlapping: false do | |
| uri = URI.parse('https://api.coinbase.com/v2/prices/LTC-EUR/spot') | |
| http = Net::HTTP.new(uri.host, uri.port) | |
| http.use_ssl = true | |
| request = Net::HTTP::Get.new(uri.request_uri) |
| class Dashing.Btcprice extends Dashing.Widget | |
| @accessor 'value', Dashing.AnimatedValue | |
| @accessor 'btcprice', -> | |
| if @get('value') | |
| price = parseFloat(@get('value')) |
| class Dashing.Ethprice extends Dashing.Widget | |
| @accessor 'value', Dashing.AnimatedValue | |
| @accessor 'ethprice', -> | |
| if @get('value') | |
| price = parseFloat(@get('value')) |
I hereby claim:
To claim this, I am signing this object:
| #import <Heliograph/Heliograph.h> | |
| static CGSize DummySizeImpl(NSObject *self, SEL cmd) { | |
| HGInstanceVariableMirror *ivar = [[reflect(self) classMirror] instanceVariableNamed:@"_rectIvar"]; | |
| CGRect rect; | |
| HGStructureValueMirror *value = [ivar valueIn:self]; | |
| [value readStructureValue:&rect]; | |
| return rect.size; | |
| } |
| #import <OpinionatedC/OpinionatedC.h> | |
| #import <Heliograph/Heliograph.h> | |
| NSArray *classes = [HGClassMirror allClasses]; | |
| HGClassMirror *longestInheritanceChain = [classes max:^NSNumber *(HGClassMirror *each) { | |
| return @([[each allSuperclasses] count]); | |
| }]; | |
| NSLog(@"%@ has %lu superclasses", longestInheritanceChain, [[longestInheritanceChain allSuperclasses] count]); | |
| #import <OpinionatedC/OpinionatedC.h> | |
| #import <Heliograph/Heliograph.h> | |
| NSArray *classes = [HGClassMirror allClasses]; | |
| HGClassMirror *mostInstanceVariables = [classes max:^NSNumber *(HGClassMirror *each) { | |
| return @([[each instanceVariables] count]); | |
| }]; | |
| NSLog(@"%@ has %lu instance Variables", mostInstanceVariables, (unsigned long)[[mostInstanceVariables instanceVariables] count]); |
| #import <OpinionatedC/OpinionatedC.h> | |
| #import <Heliograph/Heliograph.h> | |
| NSArray *classes = [HGClassMirror allClasses]; | |
| NSMutableArray *methods = [NSMutableArray array]; | |
| [classes each:^(HGClassMirror *each) { | |
| // add the instance methods of the reflected class | |
| [methods addObjectsFromArray:[each methods]]; | |
| // add the class methods of the reflected class | |
| [methods addObjectsFromArray:[[each classMirror] methods]]; |
| #import <OpinionatedC/OpinionatedC.h> | |
| #import <Heliograph/Heliograph.h> | |
| NSArray *classes = [HGClassMirror allClasses]; | |
| HGClassMirror *maxName = [classes max:^NSNumber *(HGClassMirror *each) { | |
| return @(each.name.length); | |
| }]; | |
| NSLog(@"%@", [maxName name]); | |
| // => ___UIDocumentPickerDocumentCollectionViewControllerAccessibility_super |