I hereby claim:
- I am ranterle on github.
- I am ranterle (https://keybase.io/ranterle) on keybase.
- I have a public key whose fingerprint is A29F C4DF B112 69A7 88E7 B568 51F8 5115 BFDA 44B8
To claim this, I am signing this object:
#import <CommonCrypto/CommonDigest.h> | |
@implementation SHA1FromFile | |
+ (NSString *)sha1FromFileAtPath:(NSString *)path { | |
CFReadStreamRef readStream = CFReadStreamCreateWithFile(kCFAllocatorDefault, CFURLCreateWithFileSystemPath(kCFAllocatorDefault, | |
(CFStringRef)path, | |
kCFURLPOSIXPathStyle, | |
(Boolean)false)); |
/* | |
Calculation to center diagonal separator: | |
new width of the :before-element after the rotation (Pythagoras) = 25.46px | |
add space to the right to visual center diagonal line: 25,46px / 2 = 12.73px | |
total amount for A: 25.46px + 12.73px = 38.19px | |
revise position of B: ( 25.46px - 18px ) / 2 = 3.73px; | |
change gap by adding half amount to B (+9px) than to A (+18px) | |
slightly change for visual perfection |
#import <Foundation/Foundation.h> | |
@interface NSDictionary (Localized) | |
- (id)localizedValueForKey:(NSString *)aKey; | |
- (id)localizedValueForKey:(NSString *)aKey withLanguage:(NSString *)aLanguage; | |
@end |
#launchbar { | |
opacity: 0.1; | |
-webkit-transition: opacity .2s ease-in-out; | |
-moz-transition: opacity .2s ease-in-out; | |
transition: opacity .2s ease-in-out; | |
} | |
#launchbar:hover { | |
opacity: 1.0; |
for (UIView *subview in searchBar.subviews) { | |
for (UIView *subSubview in subview.subviews) { | |
if ([subSubview conformsToProtocol:@protocol(UITextInputTraits)]) { | |
UIView<UITextInputTraits> *textInputField = (UIView<UITextInputTraits> *)subSubview; | |
textInputField.returnKeyType = UIReturnKeyDone; | |
break; | |
} | |
} | |
} |
I hereby claim:
To claim this, I am signing this object:
# encoding: utf-8 | |
xml.instruct! | |
xml.urlset "xmlns" => "http://www.sitemaps.org/schemas/sitemap/0.9" do | |
page_count = 0 | |
sitemap.resources.each do |page| | |
catch :next_page do | |
# Exclude images, metadata, config, ... | |
throw :next_page if page.url.start_with?('/images/') |
Intent i = new Intent(Intent.ACTION_VIEW); | |
i.setData("mycustomscheme://test"); | |
PackageManager manager = context.getPackageManager(); | |
List<ResolveInfo> resolvedActivites = manager.queryIntentActivities(i, PackageManager.MATCH_DEFAULT_ONLY); | |
if (!resolvedActivities.isEmpty()) { | |
// ... someone responds to the scheme | |
} else { | |
// ... nobody does | |
} |
public class SignInAction extends AnAction { | |
@Override | |
public void actionPerformed(AnActionEvent event) { | |
Project project = event.getProject(); | |
// do your sign in work... | |
} | |
@Override | |
public void update(AnActionEvent e) { | |
e.getPresentation().setEnabledAndVisible(!isAuthenticated()); |
<idea-plugin version="2"> | |
<id>com.example.yourPluginID</id> | |
<name>A simple demo plugin</name> | |
<description>This is just a simple demo plugin with no other purpose</description> | |
<version>1.0</version> | |
<vendor url="http://www.ranterle.de">ranterle</vendor> | |
<idea-version since-build="135.1"/> | |
<depends>com.intellij.modules.java</depends> |