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
#!/bin/sh | |
# Pre-commit hook for git which removes trailing whitespace, converts tabs to spaces, and enforces a max line length. | |
if git-rev-parse --verify HEAD >/dev/null 2>&1 ; then | |
against=HEAD | |
else | |
# Initial commit: diff against an empty tree object | |
against=4b825dc642cb6eb9a060e54bf8d69288fbee4904 | |
fi |
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
// | |
// Created by Chenyu Lan on 8/27/14. | |
// Copyright (c) 2014 Fenbi. All rights reserved. | |
// | |
#import <Foundation/Foundation.h> | |
#import "YTKNetworkConfig.h" | |
#import "YTKBaseRequest.h" | |
// 给url追加arguments,用于全局参数,比如AppVersion, ApiVersion等 |
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
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | |
<plist version="1.0"> | |
<dict> | |
<!-- array of downloads. --> | |
<key>items</key> | |
<array> | |
<dict> | |
<!-- an array of assets to download --> |
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
// This is used to delete mulity personal documents for Amazon kindle. | |
// | |
// Thanks for xcv58 (http://www.amazon.com/gp/pdp/profile/A22UYYGCF3VPLE) | |
// http://www.amazon.com/forum/kindle/ref=cm_cd_pg_oldest?_encoding=UTF8&authToken=&cdForum=Fx1D7SY3BVSESG&cdPage=1&cdSort=newest&cdThread=Tx1NTIGX6GSG007 | |
// | |
// 1.Make a bookmarklet, fill the url filed with the bottom javescript code. | |
// 2.In personal documents page, click the bookmarklet, and there will be a checkbox in front of every item. | |
// 3.Select the box if you want delete the item, and there are three links can select ALL, NONE and REVERSE. | |
// 4.Click the bookmarklet again, the selected items will be deleted perfectly! | |
// |
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
# | |
# Uncrustify Configuration File | |
# File Created With UncrustifyX 0.2 (140) | |
# | |
# Alignment | |
# --------- | |
## Alignment |
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
-(uint64_t)getFreeDiskSpace { | |
uint64_t totalSpace = 0; | |
uint64_t totalFreeSpace = 0; | |
NSError *error = nil; | |
NSArray *paths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES); | |
NSDictionary *dictionary = [[NSFileManager defaultManager] attributesOfFileSystemForPath:[paths lastObject] error: &error]; | |
if (dictionary) { | |
NSNumber *fileSystemSizeInBytes = [dictionary objectForKey: NSFileSystemSize]; | |
NSNumber *freeFileSystemSizeInBytes = [dictionary objectForKey:NSFileSystemFreeSize]; |
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
// | |
// UIView+Utils.h | |
// Borrowed from Three20 / DTFoundation | |
// | |
// Copyright (c) 2013 iOS. No rights reserved. | |
// | |
#import <UIKit/UIKit.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
#import <QuartzCore/QuartzCore.h> | |
#import <UIKit/UIKit.h> | |
@interface CALayer(XibConfiguration) | |
// This assigns a CGColor to borderColor. | |
@property(nonatomic, assign) UIColor* borderUIColor; | |
@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
#!/bin/bash | |
# | |
# This is an autosync script for bypy(Baidu Yun) on WD My Book Live | |
# I use it in crontab(erery hour): 0 * * * * /path/to_this_script/autosync.sh | |
# a sync my cost more than an hour, | |
# so use flag file to make sure only one autosync.sh is running.(dirty way) | |
# | |
# About bypy: Python client for Baidu Yun (Personal Cloud Storage) | |
# see: https://github.com/houtianze/bypy | |
# |
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
#!/bin/bash | |
# | |
# BurnUSBInstall.sh | |
# | |
# This is the script for burning a Mac OS X bootable USB drive. | |
# | |
# Author: maojj | |
# 2014.07.10 | |
# | |
# Prepare an 8GB+ USB stick and format it with GUID partition mapping and a partition named Untitled |
NewerOlder