Skip to content

Instantly share code, notes, and snippets.

@jackywyz
jackywyz / git_guidline.md
Created August 1, 2016 04:51 — forked from onlytiancai/git_guidline.md
git分支使用规范

分支管理

最少有三个长期分支

  • master: 用于生产环境部署
  • testing: 用于测试环境测试
  • dev: 用于日常开发

有一些临时分支

@jackywyz
jackywyz / apk-tips.md
Last active December 11, 2015 15:29
android 相关

###静默安装

  1. manifest file add this android:sharedUserId="android.uid.system"
  2. jar signapk.jar platform.x509.pem platform.pk8 abc.apk abc_signed.apk
  3. Runtime.getRuntime().exec("pm install abc_signed.apk");

反编译后重新打包

  1. apktool b -f test test.apk
  2. sign-sys test.apk -> test_signed.apk

###smali tips

@jackywyz
jackywyz / review.md
Created December 18, 2012 11:59
sipdroid.apk src review

###struct

  1. Sipdroid (Main launcher)-> send dial action (android.intent.action.CALL)
  2. SIPUri (dial action intent receive activity) -> Receiver.java(engine method return SipdroidEngine.java)
  3. SipdroidEngine (startEngine(method listen) and method call(target,true)) -> UserAgent.java( method listen and call)->
  4. ExtendedCall.java(method listen and method call) -> ExtendedInviteDialog.java extends InviteDialog(method listen and method invite)-> Dialog.java(method changeStatus) -> Sipprovider.java(addsipproviderListener)
  5. transaction/InviteTransactionServer.java(method listen)
@jackywyz
jackywyz / LazyList.scala
Created October 17, 2012 02:12
LazyList
/**
A LazyList is strict on its head, but lazy on its tail.
*/
abstract class LazyList[+A] {
def first : A ;
def rest : LazyList[A] ;
/**
*>>: evaluates right-to-left, and it is *strict* on its second argument.
@jackywyz
jackywyz / exers.scala
Created October 15, 2012 07:00
scala exercises
//private[this]
class T{private val name = "jack";private[this] val age = 28; def say = {val t = new T; t.age+t.name}}
class Test[-T,+U] { private[this] var s:U=_; private[this]var t:T=_;def say(a:T):U={ def info(b:T):T = t; s}}
//lazy
def say(a: =>Int) = {a;lazy val b= {println(2);a};b;b}
say({println(3);1})
@jackywyz
jackywyz / bash-color.sh
Created August 26, 2012 10:13
about bash shell
Other variables you can define as follows:
txtgrn=$(tput setaf 2) # Green
txtylw=$(tput setaf 3) # Yellow
txtblu=$(tput setaf 4) # Blue
txtpur=$(tput setaf 5) # Purple
txtcyn=$(tput setaf 6) # Cyan
txtwht=$(tput setaf 7) # White
txtrst=$(tput sgr0) # Text reset.
Following are the tput details further:
@jackywyz
jackywyz / apk-decompile.md
Created July 30, 2012 11:48
linux 反编译apk
@jackywyz
jackywyz / extractor.scala
Created July 22, 2012 15:36
scala functions
class CC[T] { def unapply(a:Any):Option[T] = Some(a.asInstanceOf[T]) }
object M extends CC[Map[String, Any]]
object L extends CC[List[Any]]
object S extends CC[String]
object D extends CC[Double]
object B extends CC[Boolean]
for {
Some(M(map)) <- List(JSON.parseFull(jsonString))
@jackywyz
jackywyz / break.scala
Created July 13, 2012 08:53
scala 逆变和协变的判断
import scala.util.control.Breaks._
object Continued extends scala.util.control.Breaks {}
import Continued.{break=>continue, breakable=>continuing}
// Now every time you need it:
breakable{ for (i <- 1 to 10) continuing {
if ((i%2)==0) continue
if (i>3) break
println(i)
}}
@jackywyz
jackywyz / .gitconfig
Last active December 14, 2021 07:27
vim tips
# ~/.gitconfig: git-config(1) - Git configuration
# vim: ft=gitconfig
[apply]
# Detect whitespace errors when applying a patch
whitespace = fix
[interactive]
diffFilter = diffr
[core]