-
github上你可以用别人的现成的代码 直接 git clone 即可了
-
然后你也想改代码或者贡献代码咋办?
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
-(BOOL) validateCardNumber:(NSString *)str | |
{ | |
BOOL result = NO; | |
str = [self replaceString:str withString:@"" withPattern:@"[^\\d]"]; | |
if(str!=nil && str.length>0) | |
{ | |
int num=0; | |
int weight = (str.length % 2 == 0 )?2:1; | |
int total=0; | |
int tmp=0; |
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.Linq; | |
using System.Runtime.Serialization; | |
using System.Text; | |
using System.Threading.Tasks; | |
using Windows.ApplicationModel; | |
using Windows.Storage; | |
using Windows.Storage.Streams; |
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/env ruby | |
# | |
# This script helps you make doxygen comments in Obj-C/C/C++ files in XCode | |
# | |
# Created by Fred McCann on 03/16/2010 - and Edwin. | |
# Adapted for ThisService by Martin Pichlmair 03/29/2011 | |
# http://www.duckrowing.com | |
# |
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
require 'fileutils' | |
require 'date' | |
require 'yaml' | |
require 'rexml/document' | |
require 'ya2yaml' | |
include REXML | |
doc = Document.new(File.new(ARGV[0])) |
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
+ (NSString *)intervalSinceNow: (NSString *) theDate | |
{ | |
NSDateFormatter *date=[[NSDateFormatter alloc] init]; | |
[date setDateFormat:@"yyyy-MM-dd HH:mm:ss"]; | |
NSDate *d=[date dateFromString:theDate]; | |
NSTimeInterval late=[d timeIntervalSince1970]*1; | |
NSDate* dat = [NSDate dateWithTimeIntervalSinceNow:0]; | |
NSTimeInterval now=[dat timeIntervalSince1970]*1; | |
NSString *timeString=@""; | |
NSTimeInterval cha=now-late; |
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
@echo off | |
title Windows 8 备份激活批处理 By 柳飘清枫 | |
call :admintest | |
echo. | |
echo 此工具会备份/还原您电脑上的 Windows 8 激活信息 | |
echo 还原之前需要把备份的 store 文件夹放到桌面上再运行此文件 | |
echo. | |
choice /C 12 /N /M "继续请按 1,退出请按 2" | |
IF ERRORLEVEL 2 exit | |
IF ERRORLEVEL 1 goto :menu |
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
// Copyright (c) Attack Pattern LLC. All rights reserved. | |
// Licensed under the Apache License, Version 2.0 (the "License"); | |
// you may not use this file except in compliance with the License. | |
// You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 | |
using System; | |
using System.Linq; | |
using System.Threading.Tasks; | |
using Windows.Devices.Enumeration.Pnp; | |
using Windows.System; |
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/ruby -rubygems | |
# | |
# Point appcrush at an .ipa file from the iTunes AppStore and it | |
# - expands the zip file | |
# - finds all the images | |
# - runs pngcrush with the revert-iphone-optimizations option on each image | |
# | |
# Requirements Xcode with iOS SDK 3.2 or higher | |
# | |
# Usage: appcrush '/Users/boctor/Music/iTunes/Mobile Applications/iBooks.ipa' |
Sublime Text 2 ships with a CLI called subl (why not "sublime", go figure). This utility is hidden in the following folder (assuming you installed Sublime in /Applications
like normal folk. If this following line opens Sublime Text for you, then bingo, you're ready.
open /Applications/Sublime\ Text\ 2.app/Contents/SharedSupport/bin/subl
You can find more (official) details about subl here: http://www.sublimetext.com/docs/2/osx_command_line.html