Skip to content

Instantly share code, notes, and snippets.

View scue's full-sized avatar
😛
Good good study, day day up!

scue scue

😛
Good good study, day day up!
View GitHub Profile
@scue
scue / opengrok_rules.sh
Last active August 29, 2015 14:20
opengrok assess control (with iptables rule)
#!/bin/bash -
#===============================================================================
#
# FILE: opengrok_rules.sh
#
# USAGE: ./opengrok_rules.sh
#
# DESCRIPTION:
#
# OPTIONS: ---
@scue
scue / check_string_res.py
Created May 10, 2015 05:25
Check android app project string values miss or not, usefully under android source code
#!/usr/bin/env python
# encoding: utf-8
import os, sys, getopt
import xml.dom.minidom
import subprocess
from xml.dom.minidom import Node
# 判断是否是App项目依据
Axml='AndroidManifest.xml'
@scue
scue / shell_pack.sh
Created May 10, 2015 05:52
pack a shell script and its depending files as a single executable file
#!/bin/bash -
#===============================================================================
#
# FILE: shell_pack.sh
#
# USAGE: ./shell_pack.sh
#
# DESCRIPTION:
#
# OPTIONS: ---
@scue
scue / logcat_all.sh
Created May 10, 2015 06:39
Cat all android logs
#!/system/bin/sh
#===============================================================================
#
# FILE: logcat_all.sh
#
# USAGE: ./logcat_all.sh
#
# DESCRIPTION: DEBUG版时,打印所有日志(包括时间)到指定文件,方便后期排查问题
#
# OPTIONS: ---
@scue
scue / ssh_vpn_server.sh
Created May 11, 2015 01:14
ssh vpn server config generator
#!/bin/bash -
#===============================================================================
#
# FILE: server.sh
#
# USAGE: ./server.sh
#
# DESCRIPTION:
#
# OPTIONS: ---
@scue
scue / ssh_vpn_client.sh
Created May 11, 2015 01:15
ssh vpn client config generator
#!/bin/bash -
#===============================================================================
#
# FILE: client.sh
#
# USAGE: ./client.sh
#
# DESCRIPTION:
#
# OPTIONS: ---
@scue
scue / .bash_aliases.git
Last active May 24, 2024 09:41
Git aliases autocomplete
__linux_git_complete_file=/usr/share/bash-completion/completions/git
__windows_git_complete_file=/etc/bash_completion.git
__host_os_type=$(uname -sm)
case ${__host_os_type:0:5} in
Linux)
__current_git_complete_file=$__linux_git_complete_file
;;
MINGW)
__current_git_complete_file=$__windows_git_complete_file
@scue
scue / .bashrc
Created May 14, 2015 07:13
Windows Git Bash ~/.bashrc file
function _gmto()
{
local cur prev opts
COMPREPLY=()
cur="${COMP_WORDS[COMP_CWORD]}"
prev="${COMP_WORDS[COMP_CWORD-1]}"
COMPREPLY=( $(compgen -W "$(git branch | sed '/\*/d' | xargs echo)" -- ${cur}) )
return 0
}
@scue
scue / cscope-ycm-android.sh
Last active December 13, 2021 01:50
A script generate cscope index and .ycm_extra_conf.py, find parse all Android.mk files under current directory to get all include paths.-- 根据当前目录下所有的Android.mk文件,来生成cscope索引和.ycm_extra_conf.py文件。
#!/bin/bash -
#===============================================================================
#
# FILE: cscope-android.sh
#
# USAGE:
# . build/envsetup.sh
# lunch
# cd /path/to/workdir
# # first setup, find c include path by mmm command:
@scue
scue / find-lib.sh
Created April 8, 2018 06:47
Search dynamic shared library existed or not.
#!/bin/sh
libs="
libresolv.so
libncurses.so
libtinfo.so
libm.so
libc.so
"