This file contains hidden or 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
| # vi /etc/init.d/dropbox | |
| #!/bin/sh | |
| # dropbox service | |
| # Replace with linux users you want to run Dropbox clients for | |
| DROPBOX_USERS="hjue" | |
| DAEMON=.dropbox-dist/dropbox | |
| start() { | |
| echo "Starting dropbox..." | |
| for dbuser in $DROPBOX_USERS; do |
This file contains hidden or 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
| var http = require('http'), | |
| fs = require('fs'), | |
| path = require('path'), | |
| exec = require('child_process').exec; | |
| function pipeDoc(inputPath, finalType, stream) { | |
| var finalPath = path.dirname(inputPath) | |
| + "/" + path.basename(inputPath).split('.')[0] + ".html"; | |
| var convCommand = 'unoconv -f ' + finalType + " " + inputPath; | |
| exec(convCommand,function(err, stdout, stderr) { |
This file contains hidden or 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
| <script src="http://code.jquery.com/jquery-1.7.2.min.js"></script> | |
| <link rel="stylesheet" href="http://yandex.st/highlightjs/6.2/styles/googlecode.min.css"> | |
| <script src="http://yandex.st/highlightjs/6.2/highlight.min.js"></script> | |
| <script>hljs.initHighlightingOnLoad();</script> | |
| <script type="text/javascript"> | |
| $(document).ready(function(){ | |
| $("h2,h3,h4,h5,h6").each(function(i,item){ | |
| var tag = $(item).get(0).localName; |
This file contains hidden or 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 "MobClickOpenUDID+Swizzled.h" | |
| #import <objc/message.h> | |
| #import <JRSwizzle.h> // Swizzle 类方法,这样可以避免类去调用某些Apple可能不允许的方法,通过审核 | |
| #import "YourDevice.h" // 你的设备相关类,用于生成自己的Device Unique ID | |
| #import <RegExCategories.h> // 正则表达式 | |
| #import <NSString+Ruby.h> // 字符串工具类 | |
| static NSString * const kOpenUDIDKey = @"OpenUDID"; | |
| static NSString * const kOpenUDIDSlotKey = @"OpenUDID_slot"; |
This file contains hidden or 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 | |
| # fix-xcode | |
| # Rob Napier <robnapier@gmail.com> | |
| # Script to link in all your old SDKs every time you upgrade Xcode | |
| # Create a directory called /SDKs (or modify source_path). | |
| # Under it, put all the platform directories: | |
| # MacOSX.platform iPhoneOS.platform iPhoneSimulator.platform | |
| # Under those, store the SDKs: |
This file contains hidden or 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
| <style type="text/css"> | |
| #toc ul {margin: 0} | |
| #toc>ul {padding:0} | |
| li.decimal {list-style-type: decimal;} | |
| li.lroman {list-style-type: lower-roman;} | |
| li.lalpha {list-style-type: lower-alpha;} | |
| li,li.square {list-style-type: square} | |
| </style> | |
| <script> | |
| window.onload = function () { |
This file contains hidden or 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
| - (void)saveEvent:(id)sender { | |
| //事件市场 | |
| EKEventStore *eventStore = [[EKEventStore alloc] init]; | |
| //6.0及以上通过下面方式写入事件 | |
| if ([eventStore respondsToSelector:@selector(requestAccessToEntityType:completion:)]) | |
| { |
This file contains hidden or 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 script automatically sets the version and short version string of | |
| # an Xcode project from the Git repository containing the project. | |
| # | |
| # To use this script in Xcode, add the script's path to a "Run Script" build | |
| # phase for your application target. | |
| set -o errexit | |
| set -o nounset |
This file contains hidden or 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
| server { | |
| listen 80; | |
| server_name www.justwriting.com; | |
| root /data/web/www.justwriting.com; | |
| index index.html index.php; | |
| # set expiration of assets to MAX for caching | |
| location ~* \.(ico|css|js|gif|jpe?g|png)(\?[0-9]+)?$ { | |
| expires max; |
This file contains hidden or 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
| 配置方法一: | |
| <VirtualHost *:80> | |
| DocumentRoot "/data/web/www.justwriting.com" | |
| ServerName justwriting | |
| <Directory /> | |
| Options Indexes FollowSymLinks MultiViews | |
| AllowOverride ALL | |
| Order deny,allow | |
| Allow from all | |
| </Directory> |