Skip to content

Instantly share code, notes, and snippets.

View WangXiaoxi's full-sized avatar

Wangxi WangXiaoxi

View GitHub Profile
@WangXiaoxi
WangXiaoxi / highsierra_bootable.sh
Last active November 30, 2017 00:29 — forked from agentsim/highsierra_bootable.sh
Create bootable ISO from HighSierra Installer
# Generate a BaseSystem.dmg with 10.13 Install Packages
hdiutil attach /Applications/Install\ macOS\ High\ Sierra.app/Contents/SharedSupport/InstallESD.dmg -noverify -mountpoint /Volumes/highsierra
hdiutil create -o /tmp/HighSierraBase.cdr -size 7316m -layout SPUD -fs HFS+J
hdiutil attach /tmp/HighSierraBase.cdr.dmg -noverify -mountpoint /Volumes/install_build
asr restore -source /Applications/Install\ macOS\ High\ Sierra.app/Contents/SharedSupport/BaseSystem.dmg -target /Volumes/install_build -noprompt -noverify -erase
cp -R /Volumes/highsierra/Packages /Volumes/OS\ X\ Base\ System/System/Installation
hdiutil detach /Volumes/OS\ X\ Base\ System/
hdiutil detach /Volumes/highsierra/
mv /tmp/HighSierraBase.cdr.dmg /tmp/BaseSystem.dmg
@WangXiaoxi
WangXiaoxi / isChinese.m
Created September 5, 2017 08:46
判断是否有中文
//判断是否是中文
- (BOOL)isChinese:(NSString *)str {
for(int i=0; i<[str length];i++)
{
int a = [str characterAtIndex:i];
if( a > 0x4e00 && a < 0x9fff)
{
return YES;
}
}
@WangXiaoxi
WangXiaoxi / rename
Created April 27, 2017 11:07
Batch rename files name with python
import os
for filename in os.listdir("."):
if filename.startswith("evaluation"):
os.rename(filename, "review"+filename[10:])
@WangXiaoxi
WangXiaoxi / iterm2-solarized.md
Created February 23, 2017 12:26 — forked from kevin-smets/iterm2-solarized.md
iTerm2 + Oh My Zsh + Solarized color scheme + Meslo powerline font + [Powerlevel9k] - (macOS)

Default

Default

Powerlevel9k

Powerlevel9k

<android.support.v7.widget.LinearLayoutCompat
android:layout_width="match_parent"
android:layout_height="20dp"
android:orientation="horizontal">
<TextView
android:layout_width="wrap_content"
android:layout_height="20dp"
android:text="hahahahahhahahaaaaaahahhaaaaaaaaaaaaaaaaa"
android:ellipsize="end"