ZeroJS

ZeroJS - The world's smallest JavaScript library! Zero size, zero functionality. Happy April Fool’s Day :)

Android Modding

Change CRT screen off animation into fade screen off animation and minimize 48 dip high navigation bar into smaller 24 dip one.
adb pull /system/framework/framework-res.apk

apktool d framework-res.apk

sed -e 's/<bool name="config_animateScreenLights">false<\/bool>/<bool name="config_animateScreenLights">true<\/bool>/' \
    -i framework-res/res/values/bools.xml

sed -e 's/<dimen name="navigation_bar_height">.*/<dimen name="navigation_bar_height">24.0dip<\/dimen>/' \
    -e 's/<dimen name="navigation_bar_height_landscape">.*/<dimen name="navigation_bar_height_landscape">24.0dip<\/dimen>/' \
    -e 's/<dimen name="navigation_bar_width">.*/<dimen name="navigation_bar_width">24.0dip<\/dimen>/' \
    -i framework-res/res/values/dimens.xml

apktool b framework-res

7z x framework-res/dist/framework-res.apk resources.arsc
7z u -tzip framework-res.apk resources.arsc

adb remount
adb shell mkdir /system/framework/backup
adb shell cp /system/framework/framework-res.apk /system/framework/backup
adb push framework-res.apk /system/framework
adb shell chmod 644 /system/framework/framework-res.apk

adb reboot

WebOS Exchange ActiveSync User Agent

Changing of Exchange ActiveSync User Agent string on HP Palm devices is done by editing /usr/share/dbus-1/system-services/com.palm.eas.service file:

[D-BUS Service]
Name=com.palm.eas
Exec=/usr/bin/mojomail-eas -c {...} Palm Palm/1.0.1
The last two strings stand for Device Type and User Agent.

In some cases changing of Device ID may by required as well which can be achieved using Impostash application (Device Profile -> nduId).

List of observed Device Type and User Agent strings can be obtained from Exchange server reports.

Git Basic Setup

Set user and email for commits and enable colorized output:
git config --global user.name "John Doe"
git config --global user.email john.doe@foo.com
git config --global --add color.ui true
Optionally add couple of helpful Git aliases into your shell profile (~/.bashrc in case of using Bash):
alias ga='git add'
alias gai='git add -i'
alias gc='git commit'
alias gd='git diff'
alias gdc='git diff --cached'
alias gm='git merge --no-ff'
alias gst='git status -s'

RHEL Subscription

Register a new system and attach a subscription to it. Then execute the following commands to obtain the registration and subscription data using newly registered system UUID:

subscription-manager register --consumerid=UUID
subscription-manager subscribe --auto
Edit /etc/yum.repos.d/redhat.repo to enable or disable additional repositories.

Non-root Process Listening on Priviledged Ports

Allow a user application to bind to a port below 1024 using POSIX File Capabilities:
setcap cap_net_bind_service=+eip /path/to/the/executable