- Proposal: SE-NNNN
- Authors: Vincent Esche
- Review Manager: TBD
- Status: Awaiting review
During the review process, add the following fields as needed:
// Copyright 2012 Dirk Holtwick, holtwick.it. All rights reserved. | |
@import Foundation; | |
#define HORegexDefaultOptions NSRegularExpressionCaseInsensitive | NSRegularExpressionAnchorsMatchLines | NSRegularExpressionAllowCommentsAndWhitespace | |
@interface HORegexMatch : NSTextCheckingResult | |
@property (readonly, nonatomic) NSString *text; | |
@property (readonly, nonatomic) NSTextCheckingResult *match; |
#!/usr/bin/env python | |
# -*- coding: utf-8 -*- | |
# assumes your file is called mbox | |
# writes to a file called mbox.csv | |
import mailbox | |
import csv | |
During the review process, add the following fields as needed:
# pragma mark Custom caret | |
- (void)drawInsertionPointInRect:(NSRect)aRect color:(NSColor *)aColor turnedOn:(BOOL)flag { | |
aRect.size.width = self.caretWidth; | |
[super drawInsertionPointInRect:aRect color:aColor turnedOn:flag]; | |
} | |
// This is a hack to get the caret drawing to work. I know, I know. | |
- (void)setNeedsDisplayInRect:(NSRect)invalidRect { | |
invalidRect.size.width += self.caretWidth - 1; |
window.fluid.dockBadge = ''; | |
setTimeout(updateDockBadge, 1000); | |
setTimeout(updateDockBadge, 3000); | |
setInterval(updateDockBadge, 5000); | |
function updateDockBadge() { | |
window.fluid.dockBadge = document.querySelector('[title^="Inbox"]').title.match(/\d+/); | |
} |
window.fluid.dockBadge = ''; | |
function updateDockBadge() { | |
console.log('check new messages'); | |
var navigation = document.querySelector('[role=navigation]') | |
var doc = navigation.contentDocument || navigation.ownerDocument; | |
if (!doc) { return; } |
set path_ to (get path to desktop as string) & "FOLDER NAME HERE" | |
set prefix_ to "PREFIX HERE" | |
tell application "Finder" | |
set dir_ to folder path_ | |
set files_ to items of dir_ whose name of it starts with prefix_ | |
set start_ to (get length of prefix_) + 1 | |
repeat with file_ in files_ | |
set oldname_ to name of file_ | |
set end_ to length of oldname_ |
template<typename T> inline T* objc_cast(id from) { | |
if ([from isKindOfClass:[T class]]) { | |
return static_cast<T*>(from); | |
} | |
return nil; | |
} |
#!/usr/bin/env php | |
<?php | |
$text = $_ENV[ 'TM_SELECTED_TEXT' ]; | |
print preg_replace_callback( | |
'/(\d)/', | |
function( $matches ) | |
{ | |
return $matches[ 0 ] + 1; |