Advertisement
Guest User

Untitled

a guest
Jun 23rd, 2017
73
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.98 KB | None | 0 0
  1. To enable the crash reporter on local builds:
  2. export MOZ_CRASHREPORTER=1 and re-run mach config to pick up the change
  3.  
  4. adb logcat -s "GeckoMemoryMonitor"
  5. adb shell am broadcast -a org.mozilla.gecko.FORCE_MEMORY_PRESSURE
  6.  
  7. Busy sleep in JS:
  8. log("sleeping 20 s");
  9. this._sleep(20000);
  10. log("returned from sleep");
  11.  
  12. _sleep: function sleepFor(sleepDuration) {
  13. var now = new Date().getTime();
  14. while(new Date().getTime() < now + sleepDuration){ /* do nothing */ }
  15. }
  16.  
  17. Fuzzy hg import
  18. hg import --config ui.patch="patch --merge" fuzzy.patch
  19.  
  20.  
  21. GDB:
  22. Ctrl + C = break
  23. continue / c
  24. step / s = single step
  25. next / = step over
  26. break <file:line or functionname> = set breakpoint
  27. bt = backtrace calling stack
  28. print <variable name>
  29.  
  30. ./gradlew clean app:assembleLocalAustralisDebug
  31. ./mach gradle clean app:assembleLocalAustralisDebug
  32. ./mach build && ./mach package && ./mach gradle clean app:assembleLocalAustralisDebug
  33. ./mach gradle clean app:assembleOfficialAustralisDebug && ./mach gradle app:assembleOfficialAustralisDebugAndroidTest
  34.  
  35. Strg + Alt + Shift + I: bring up inspections in Android Studio (e.g. unused resources)
  36.  
  37. HG alias for empty commit
  38. [alias] empty = !touch tmp ; $HG add tmp ; $HG commit tmp -m "<enter commit message>" ; $HG rm tmp ; $HG commit tmp --amend "$@"
  39. on Windows:
  40. empty = !touch tmp && hg add tmp && hg commit tmp -m "<enter commit message>" && hg rm tmp && hg commit tmp --amend "$@"
  41.  
  42. Redirect output for faster builds
  43. ./mach build > build.log 2>&1
  44.  
  45. Update rust:
  46. rustup update
  47.  
  48. Screenshot via adb:
  49. adb shell screencap -p | sed 's/\r$//' > screen.png
  50. adb shell screencap -p | perl -pe 's/\x0D\x0A/\x0A/g' > screen.png
  51. adb exec-out screencap -p > screen.png
  52.  
  53. android.os.Debug.waitForDebugger();
  54.  
  55. Enable Desktop remote debugging:
  56. Shift + F2 for developer console, then "listen <port>"
  57.  
  58. devtools.debugger.new-debugger-frontend
  59.  
  60. GeckoConsole|GeckoSession|GeckoBrowser:
  61.  
  62. root shell:
  63. sudo -s
  64.  
  65. Reclaim empty virtual disk space:
  66. e4defrag /dev/sda1
  67. dd if=/dev/zero of=wipefile bs=1024x1024; rm wipefile
  68. Compact disk in VMWare
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement