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:
/*! | |
* | |
* 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-2020 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: |
// It's tested on ios 8.2 .. | |
// Apple document about virtual memory: | |
// Both OS X and iOS include a fully-integrated virtual memory system that you cannot turn off; it is always on. | |
// https://developer.apple.com/library/mac/documentation/Performance/Conceptual/ManagingMemory/Articles/AboutMemory.html | |
// Discussing mmap on ios: | |
// http://stackoverflow.com/questions/13425558/why-does-mmap-fail-on-ios | |
// http://stackoverflow.com/questions/9184773/is-there-a-practical-limit-on-the-number-of-memory-mapped-files-in-ios | |
#include <sys/mman.h> |