This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import sublime, sublime_plugin | |
from uuid import uuid1 | |
class generate_uuid1Command(sublime_plugin.TextCommand): | |
def insert_text(self, edit, what): | |
[self.view.replace(edit, reg, what) for reg in self.view.sel()] | |
def run(self, edit): | |
self.insert_text(edit, str(uuid1())) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Collections.Generic; | |
using System.IO; | |
using System.Runtime.InteropServices; | |
using System.Windows.Media; | |
using System.Windows.Media.Imaging; | |
namespace OpenCVFaceDetector | |
{ | |
class DllPaths |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Show hidden characters
{ | |
"cmd": ["bash", "--login", "-c", "$file"], | |
"file_regex": "^[ ]*File \"(...*?)\", line ([0-9]*)", | |
"selector": "source.python" | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/python | |
# This script unshreds a shredded image (visit http://bit.ly/sCMAD5 for details) | |
# author: Zoreslav Khimich <zoreslav.khimich@gmail.com> | |
from PIL import Image, ImageChops, ImageStat | |
from argparse import ArgumentParser | |
import sys, heapq | |
MAGIC_THRESHOLD = 11 # carefully handpicked to work with your reference input |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// | |
// ZKCGHelpers.c | |
// Quartz 2D Helpers | |
// | |
// Created by Zoreslav Khimich on 5/9/12. | |
// Copyright (c) 2012 Zoreslav Khimich. All rights reserved. | |
// | |
#include "ZKCGHelpers.h" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// | |
// UIViewController+ZWDModalOverlay.h | |
// | |
// Created by Zoreslav Khimich on 28/01/2013. | |
// Copyright (c) 2013 zrxq. All rights reserved. | |
// | |
#import <UIKit/UIKit.h> | |
@interface UIViewController (ZWDModalOverlay) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
inline static CGRect CGRectCenterRectForResizableImage(UIImage *image) { | |
return CGRectMake(image.capInsets.left/image.size.width, image.capInsets.top/image.size.height, (image.size.width-image.capInsets.right-image.capInsets.left)/image.size.width, (image.size.height-image.capInsets.bottom-image.capInsets.top)/image.size.height); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
inline static CGRect CGRectEdgeInset(CGRect rect, UIEdgeInsets insets) { | |
return CGRectMake(CGRectGetMinX(rect)+insets.left, CGRectGetMinY(rect)+insets.top, CGRectGetWidth(rect)-insets.left-insets.right, CGRectGetHeight(rect)-insets.top-insets.bottom); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#import <UIKit/UIKit.h> | |
@interface DatePickingCell : UITableViewCell | |
@property (strong, nonatomic) UIDatePicker *datePicker; | |
@end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"cmd": ["/usr/local/bin/objc-run", "$file"], | |
} |
OlderNewer