DSDT GUIDE

Overview

In order to make many OS X features work well on a laptop, you will always need a properly patched DSDT (and SSDTs). The purpose of this guide is to provide a foundation for proper patching of your OEM DSDT/SSDTs.

Advanced users may wish to implement hotpatching via Clover. See guide here: http://www.tonymacx86.com/threads/guide-using-clover-to-hotpatch-acpi.200137/

Although you may be tempted to use a DSDT from another computer, it will almost always end in failure. You simply cannot be certain it is valid to use ACPI files from another computer. Even minor differences in hardware configuration (BIOS version, amount of memory installed, BIOS options selected, and other hardware differences such as which WiFi card is installed) can make for differences that cause instability and weird bugs if you use foreign ACPI files. Differences such as BIOS version, amount of memory installed, BIOS options selected, and other hardware differences such as which WiFi card is installed, can make various OperationRegion addresses different, which makes a patched DSDT for one system incompatible with another. It is also not uncommon for the same laptop model to be produced in different runs with different motherboards, and potentially incompatible ACPI files.

Read More

Atom使用技巧

打开项目

1
ctrl + o

模糊查找文件

1
2
ctrl + t  / ctrl + p
ctrl + b 仅仅查找已经打开的文件

命令模式

1
ctrl + shift +p

另存为

1
ctrl + shift + s

gmerge-conflicts

1
在使用 Git 进行合并和 rebase 的时候可以用 alt-m d 来激活这个插件,它会列出所有冲突的文件,将每一处冲突高亮,同时有按钮和快捷键供你快速选用某个版本,在你解决所有冲突后会提示你进行 Commit. 有了这个插件再也不同担心出冲突的时候看瞎眼了。

Linux常用技巧

使用ls显示一个文件的绝路径:

1
ls file |sed "s:^:`pwd`/:"

创建一个程序的启动器:

使用Desktop Entery的格式,首先需要进入相应目录建立文件,在文件中写入程序相关信息:

1
2
cd /usr/share/applications/
sudo vim application.desktop

开始写入文件信息,格式如下:

1
2
3
4
5
6
7
[Desktop Entery]
Version=1.0
Name=AppName
Exec=/application/path
Icon=/application/icon.png
Terminal=false
Type=Application

vim中选定内容:

命令模式下使用vi命令变为可视之后即可选中,使用d就可以删除

快速处理某个被包含的内容:

以下命令可以对标点内的内容进行操作。

ci’、ci”、ci(、ci[、ci{、ci< - 分别更改这些配对标点符号中的文本内容
di’、di”、di(或dib、di[、di{或diB、di< - 分别删除这些配对标点符号中的文本内容
yi’、yi”、yi(、yi[、yi{、yi< - 分别复制这些配对标点符号中的文本内容
vi’、vi”、vi(、vi[、vi{、vi< - 分别选中这些配对标点符号中的文本内容

另外如果把上面的i改成a可以连配对标点一起操作。
举个例子:
比如要操作的文本如下:
111”222”333
将光标移到”222”的任何一个字符处输入命令 di” ,文本会变成: 111””333
若输入命令 da” ,文本会变成: 111333

Linux下安装Node.js

手动二进制包的安装方法

一般来说我们在Node的官网上是找不到Linux的Deb包,或者是Rpm包的,他针对Windows和mac都有二进制的安装包,但是Linux只有一个tar.xz这个包下载下来虽然也是一个二进制的包,类似于Windows中的绿色软件,也非常好配置,仅仅使用

1
tar -xvf package.tar.xz

即可完成解压,然后使用软连接,把node与npm文件链接到*/usr/local/bin*下面

Read More

markdown语法

Markdown 语法说明 (简体中文版) / (点击查看快速入门)

概述
宗旨
兼容 HTML
特殊字符自动转换
区块元素
段落和换行
标题
区块引用
列表
代码区块
分隔线
区段元素
链接
强调
代码
图片
其它
反斜杠
自动链接
感谢
概述

Read More

关于gitlab的deploy无权push的问题

今天准备两个人协同开发一个项目,然后建立了一个组。一开始是给了deploye权限,
但是他说没有权限上传,我就把权限提高但是我把权限提到master之后还是不行,清缓存
什么的都做了还是不行,提交的时候一直出现以下错误:
错误提示:

Read More

Dell黑苹果折腾

早在大一的时候就开始折腾黑苹果了,当时第一次看到mac的界面的时候我就深深的爱上了这款操作系统,而且最重要的是他是集Linux与Windows的优点于一身的系统。

Read More

我的2016

​ 每一年过去,我都会在我的博客记录这一年的总结,回顾过去一年的得失,又可以展望一下新的一年。每次看到这些文字就好像看到了我这一年的旅程。

Read More