Skip to content

Instantly share code, notes, and snippets.

View Identity-labs's full-sized avatar

Identity-labs

  • Paris
View GitHub Profile
0x8290252FFF36ACB5 _SET_CONTROL_GROUP_COLOR
0x91D657230BC208D2
0x94B261F1F35293E1
0x9868C0D0134855F7
0x98EFA132A4117BE1 SET_PED_NAME_DEBUG
0x9935F76407C32539
0xA45884DB10EC7EE3
0xA565FAC215CBC77D
0xA8638BE228D4751A UNREGISTER_SCRIPT_WITH_AUDIO
0xA8C44C13419634F2 _STOP_RECORDING_THIS_FRAME
@Identity-labs
Identity-labs / countWatchers.js
Created June 22, 2016 12:01
angularjs, debug watchers growing in app
$rootScope.countWatchers = function () {
var q = [$rootScope], watchers = 0, scope;
while (q.length > 0) {
scope = q.pop();
if (scope.$$watchers) {
watchers += scope.$$watchers.length;
}
if (scope.$$childHead) {
q.push(scope.$$childHead);
}
var jq = document.createElement('script');
jq.src = "https://ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js";
document.getElementsByTagName('head')[0].appendChild(jq);
#!/bin/bash
# need to chmod +x the file
# find-out-what-is-using-your-swap.sh
# -- Get current swap usage for all running processes
# --
# -- rev.0.3, 2012-09-03, Jan Smid - alignment and intendation, sorting
# -- rev.0.2, 2012-08-09, Mikko Rantalainen - pipe the output to "sort -nk3" to get sorted output
# -- rev.0.1, 2011-05-27, Erik Ljungstrom - initial version