Skip to content

Instantly share code, notes, and snippets.

View legendtang's full-sized avatar
:shipit:
Coding

legendtang

:shipit:
Coding
View GitHub Profile
@legendtang
legendtang / 30-usbmount.sh
Last active October 16, 2015 04:40
For ufsd only, not designed for NTFS-3g
#!/bin/sh
case "$ACTION" in
add)
for i in $(ls /dev/ | grep 'sd[a-z][1-9]')
do
mkdir -p /mnt/$i
mount -t ufsd -o iocharset=utf8,rw /dev/$i /mnt/$i
if test "$?" -ne 0 ;then
mount -t ufsd -o rw /dev/$i /mnt/$i
@legendtang
legendtang / mentohust.sh
Created October 17, 2015 15:41
/etc/init.d/mentohust
#!/bin/sh /etc/rc.common
START=99
STOP=10
start()
{
mentohust >/dev/null 2>&1
}
stop()
{
sync
@legendtang
legendtang / 10-auto-mount.sh
Created October 21, 2015 14:02
ufsd compatible auto-mount
#!/bin/sh
set_fstab(){
my_fstype="`block info | grep "/dev/$device" | awk -F 'TYPE="' '{print $2}' | sed 's/\"//'`"
[ -n "$my_fstype" ] && {
logger -t Auto-Mount "New block.File system:${my_fstype}"
if [ "$my_fstype" = 'swap' ]; then
@legendtang
legendtang / gapps-config-jfltexx.txt
Created December 27, 2015 08:46
Configurations for Open GApps Stock Package (jfltexx)
Books
CloudPrint
Fitness
Keep
NewsStand
NewsWidget
Hangouts
Movies
Email
Gmail
@legendtang
legendtang / hosts.bat
Created July 16, 2016 15:31
BAT for quick access to editing Windows hosts
@echo off
:: BatchGotAdmin
:-------------------------------------
REM --> Check for permissions
>nul 2>&1 "%SYSTEMROOT%\system32\cacls.exe" "%SYSTEMROOT%\system32\config\system"
REM --> If error flag set, we do not have admin.
if '%errorlevel%' NEQ '0' (
echo Requesting administrative privileges...
@legendtang
legendtang / config.py
Last active November 3, 2016 17:58
Configuration file for binux/qiandao with env var support.
#!/usr/bin/env python
# -*- encoding: utf-8 -*-
# vim: set et sw=4 ts=4 sts=4 ff=unix fenc=utf8:
# Author: Binux<i@binux.me>
# http://binux.me
# Created on 2014-07-30 12:21:48
# Modified on 2016-11-03 01:46:00 by @legendtang
import hashlib
import os
@legendtang
legendtang / Proxifier.ppx
Last active December 26, 2016 17:21
Yer Another Configuration for Proxifier (Chinese Users)
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<ProxifierProfile version="101" platform="Windows" product_id="0" product_minver="310">
<Options>
<Resolve>
<AutoModeDetection enabled="true" />
<ViaProxy enabled="false">
<TryLocalDnsFirst enabled="false" />
</ViaProxy>
<ExclusionList>%ComputerName%; localhost; *.local</ExclusionList>
</Resolve>
@legendtang
legendtang / 50-user.conf
Created February 28, 2017 11:54
Fontconfig after installing WPS
<?xml version="1.0"?>
<!DOCTYPE fontconfig SYSTEM "fonts.dtd">
<fontconfig>
<!--
Load per-user customization files where stored on XDG Base Directory
specification compliant places. it should be usually:
$HOME/.config/fontconfig/conf.d
$HOME/.config/fontconfig/fonts.conf
-->
<?xml version="1.0"?>
<!DOCTYPE fontconfig SYSTEM "fonts.dtd">
<fontconfig>
<!--
Load per-user customization files where stored on XDG Base Directory
specification compliant places. it should be usually:
$HOME/.config/fontconfig/conf.d
$HOME/.config/fontconfig/fonts.conf
-->
src/gz reboot_core http://mirrors.ustc.edu.cn/lede/releases/17.01.2/targets/ar71xx/generic/packages
src/gz reboot_base http://mirrors.ustc.edu.cn/lede/releases/17.01.2/packages/mips_24kc/base
src/gz reboot_luci http://mirrors.ustc.edu.cn/lede/releases/17.01.2/packages/mips_24kc/luci
src/gz reboot_packages http://mirrors.ustc.edu.cn/lede/releases/17.01.2/packages/mips_24kc/packages
src/gz reboot_routing http://mirrors.ustc.edu.cn/lede/releases/17.01.2/packages/mips_24kc/routing
src/gz reboot_telephony http://mirrors.ustc.edu.cn/lede/releases/17.01.2/packages/mips_24kc/telephony