Required tools for playing around with memory:
hexdumpobjdumpreadelfxxdgcore
| /*! | |
| * | |
| * NEW VERSION AT https://github.com/c-kick/mobileConsole | |
| * | |
| * hnl.mobileConsole - javascript mobile console - v1.3.8 - 04/01/2021 | |
| * Adds html console to webpage. Especially useful for debugging JS on mobile devices. | |
| * Supports 'log', 'trace', 'info', 'warn', 'error', 'group', 'groupEnd', 'table', 'assert', 'clear' | |
| * Inspired by code by Jakub Fiala (https://gist.github.com/jakubfiala/8fe3461ab6508f46003d) | |
| * Licensed under the MIT license | |
| * |
| vm.swappiness=90 | |
| vm.dirty_ratio=50 | |
| vm.dirty_background_ratio=30 | |
| vm.dirty_writeback_centisecs=60000 | |
| vm.vfs_cache_pressure=150 | |
| vm.laptop_mode=1 | |
| vm.page-cluster=1 | |
| vm.min_free_kbytes=2048 | |
| vm.memory_failure_recovery=1 | |
| vm.panic_on_oom=1 |
Note: these instructions are for pre-Sierra MacOS. Sierra (10.12) and newer users see https://gist.github.com/gravitylow/fb595186ce6068537a6e9da6d8b5b96d by @gravitylow
If you are getting this in gdb on OSX while trying to run a program:
VBoxManage list vms
=> "virtualMachine" {xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx}| #!/bin/sh | |
| # This assumes you have access to the system via SSH already, and need | |
| # remote VNC access as the same user, and you want only the primary display. | |
| export DISPLAY=:0 | |
| # Encoded password with http://www.motobit.com/util/base64-decoder-encoder.asp | |
| export VNC_PASSWORD="dm5jX3Bhc3N3b3JkNzE=" # vnc_password71 | |
| export VNC_PASSWORD="dm5jX3Bhc3M=" # vnc_password (a character limit is enforced?) | |
| # Sadly many common VNC clients don't support encryption. |
| local redis_c = require "resty.redis" | |
| local ok, new_tab = pcall(require, "table.new") | |
| if not ok or type(new_tab) ~= "function" then | |
| new_tab = function (narr, nrec) return {} end | |
| end | |
| local _M = new_tab(0, 155) |
| class Foo { | |
| constructor(x,y,z) { | |
| Object.assign(this,{ x, y, z }); | |
| } | |
| hello() { | |
| console.log(this.x + this.y + this.z); | |
| } | |
| } |
| /* | |
| Copyright (c) 2015-2025 Alessandro Diaferia | |
| Permission is hereby granted, free of charge, to any person obtaining a copy | |
| of this software and associated documentation files (the "Software"), to deal | |
| in the Software without restriction, including without limitation the rights | |
| to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | |
| copies of the Software, and to permit persons to whom the Software is | |
| furnished to do so, subject to the following conditions: |