Skip to content

Instantly share code, notes, and snippets.

View zeuxisoo's full-sized avatar
🛥️
No response

Zeuxis zeuxisoo

🛥️
No response
View GitHub Profile
@zeuxisoo
zeuxisoo / AppInfo.java
Created April 16, 2011 15:45
AppInfo some codes
package com.zeuxislo.appsinfo;
import java.io.File;
import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Method;
import java.sql.Date;
import java.text.SimpleDateFormat;
import android.app.Activity;
import android.content.pm.IPackageStatsObserver;
@zeuxisoo
zeuxisoo / gist:949403
Created April 30, 2011 04:23
Git local to remote server (different ssh port)

Git add remote server with other ssh port

git remote add [category] ssh://user@host:1234/srv/git/example

Create Git repo on server

mkdir /git/[category]/test.git cd /git/[category]/test.git && git init --bare --shared

Push files from local to server

@zeuxisoo
zeuxisoo / commit.sh
Created April 30, 2011 05:19
Simple script to commit multi projects
#!/bin/bash
# Author: Neo.Lo
# Create: 2011-04-30 13:00PM
# share
function commit_branches {
echo "Please select ($1) branches to commit:"
select branches in "develop" "master"; do
case $branches in
Titanium.UI.setBackgroundColor('#FFFFFF');
var main = Titanium.UI.createWindow({
title: 'Test',
visible: true
});
Ti.include('ui.js');
main.open({
@zeuxisoo
zeuxisoo / DOMPerson.java
Created May 15, 2011 08:09
Android 中以 SAX/DOM/Pull 解釋 XML
//(2)DOM解析XML文件时,会将XML文件的所有内容读取到内存中,然后允许您使用DOM API遍历XML树、检索所需的数据。
DOMPerson.java
import java.io.InputStream;
import java.util.ArrayList;
import java.util.List;
import javax.xml.parsers.DocumentBuilder;
import javax.xml.parsers.DocumentBuilderFactory;
import org.w3c.dom.Document;
@zeuxisoo
zeuxisoo / gist:980039
Created May 19, 2011 02:14
Disbale and Clean the .DS_store

Remove directory .DS_Store file

find ~/Desktop -name ".DS_Store" -delete

Disable auto create .DS_Store file

defaults write com.apple.desktopservices DSDontWriteNetworkStores true

@zeuxisoo
zeuxisoo / gist:980174
Created May 19, 2011 04:15
How to use git diff to patch file

Create patch file

git diff --no-prefix > [path file name]

Apply path file

patch -p0 < [path file name]

@zeuxisoo
zeuxisoo / gist:982538
Created May 20, 2011 08:13
Install PIL
export ARCHFLAGS='-arch i386'
easy_install -f http://dist.plone.org/thirdparty/ -U PIL==1.1.7
@zeuxisoo
zeuxisoo / gist:986141
Created May 23, 2011 03:02
Create zip from directory
zip -r [Zip Filename.zip] [Directory]
@zeuxisoo
zeuxisoo / gist:997485
Created May 29, 2011 05:02
Install and Uninstall Android applications with PackageInstaller

In android source code can get

<activity android:name=".PackageInstallerActivity">
    <intent-filter>
        <action android:name="android.intent.action.VIEW" />
        <category android:name="android.intent.category.DEFAULT" />
        <data android:scheme="content" />
        <data android:scheme="file" />