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 bash | |
# Original: http://thezinx.com/2013/10/29/create-bootable-dmg-iso-mavericks-app.html | |
V_BUILD=/Volumes/install_build | |
V_APP=/Volumes/install_app | |
T_SI_B=/tmp/mavericks | |
T_SI=$T_SI_B.sparseimage |
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 | |
# | |
# Use posixregex CLI tool from: https://github.com/syzdek/dmstools/blob/master/src/posixregex.c | |
RE_IPV4="((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])" | |
posixregex -r "^(${RE_IPV4})$" \ | |
127.0.0.1 \ | |
10.0.0.1 \ | |
192.168.1.1 \ |
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
@implementation MySharedThing | |
+ (id)sharedInstance | |
{ | |
DEFINE_SHARED_INSTANCE_USING_BLOCK(^{ | |
return [[self alloc] init]; | |
}); | |
} | |
@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/sh | |
# Change this line to the URI path of the xcode DMG file. | |
# XCode 3.2.5 | |
#XCODE_PATH="/ios/ios_sdk_4.2__final/xcode_3.2.5_and_ios_sdk_4.2_final.dmg" | |
# XCode 4 | |
#XCODE_PATH="/Developer_Tools/xcode_4_and_ios_sdk_4.3__final/xcode_4_and_ios_sdk_4.3__final.dmg" |
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
#:~/.config/google-chrome/Default/Preferences | |
# 或 ~/.config/Chromium/Default/Preferences | |
#在此文件中修改最后一段如下: | |
"webkit": { | |
"webprefs": { | |
"default_fixed_font_size": 16, | |
"default_font_size": 16, | |
"fixed_font_family": "DejaVu Sans Mono", | |
"minimum_font_size": 12, |
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 'net/http' | |
require 'uri' | |
require 'cgi' | |
text = "<html><head><title>Delicious2Google</title></head><body>" + | |
"<h1>Upload</h1>" + | |
"<form action='https://www.google.com/bookmarks/mark?op=upload&zx=#{rand(65535)}' method='POST'>" + | |
"<input type='submit'/><input type='hidden' id='data'></form>" + | |
"<textarea id='xml' style='display:none'>\n<bookmarks>\n" |