Kernel LSM
中提供了大量常用操作的 hook
,可以让开发者在这些操作执行前进行检查,便于对程序进行管控。
但由于 LSM Module
必须编译进内核,因此需要公开源码,这通常不符合很多开发者的要求。
基于这种情况, uos
基于 LSM
开发了一个 hook manager
的模块,可提供接口给开发者使用,达到了动态注册/移除 LSM Hook
的目的。
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
thinkpad tmp # go version | |
go version devel +d862753 Wed Sep 9 05:29:20 2015 +0000 linux/amd64 | |
thinkpad tmp # gomobile bind -a -v -x -o bukanir.aar -target android bukanir | |
GOMOBILE=/home/milann/golang/pkg/gomobile | |
WORK=/tmp/gomobile-work-763706777 | |
write /tmp/gomobile-work-763706777/go_bukanir/go_bukanirmain.go | |
mkdir -p $WORK/go_bukanir | |
gobind -lang=go -outdir=$WORK/go_bukanir bukanir | |
write /tmp/gomobile-work-763706777/androidlib/main.go | |
mkdir -p $WORK/androidlib |
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
git config --global https.proxy http://127.0.0.1:1080 | |
git config --global https.proxy https://127.0.0.1:1080 | |
git config --global --unset http.proxy | |
git config --global --unset https.proxy | |
npm config delete proxy |
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
一、键盘风格 | |
UIKit框架支持8种风格键盘 | |
``` | |
typedef enum { | |
UIKeyboardTypeDefault, // 默认键盘:支持所有字符 | |
UIKeyboardTypeASCIICapable, // 支持ASCII的默认键盘 | |
UIKeyboardTypeNumbersAndPunctuation, // 标准电话键盘,支持+*#等符号 | |
UIKeyboardTypeURL, // URL键盘,有.com按钮;只支持URL字符 | |
UIKeyboardTypeNumberPad, //数字键盘 |
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 will install a Git pre-push hook that prevents force pushing the master/main branch. | |
# There are three variants that I have built: | |
# - pre-push: prevents force-pushing to master/main. | |
# - pre-push-2: prevents force-pushing to master/main depending on the remote (you need to edit the file!). | |
# - pre-push-3: prevents any type of pushing to master/main. | |
# Set the desired version like this before proceeding: | |
# FILE=pre-push | |
# Single repo installation: |
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
@interface NSCodingSearchBar : UISearchBar | |
// Default by the system is YES. | |
// https://github.com/nst/iOS-Runtime-Headers/blob/master/Frameworks/UIKit.framework/UISearchBar.h | |
@property (nonatomic, assign, setter = setHasCentredPlaceholder:) BOOL hasCentredPlaceholder; | |
@end |
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
package main | |
import ( | |
"os" | |
"log" | |
"net" | |
"strconv" | |
"strings" | |
) |
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
#################################################### | |
# Global .gitignore Flle | |
# Reference: http://help.github.com/ignore-files/ | |
# Save this in a file: ~/.gitignore_global | |
# Then at the command line (you will see more info if a repo is in the current folder): | |
# git config --global core.excludesfile ~/.gitignore_global | |
# git config --list | |
##################### | |
# Maven # |