Skip to content

Instantly share code, notes, and snippets.

View indutny's full-sized avatar
🐋
Thanks for the fish!

Fedor Indutny indutny

🐋
Thanks for the fish!
View GitHub Profile
@indutny
indutny / info.md
Last active November 22, 2016 05:39
"Xcode - lldb" version correspondence

Thank you for participation, we've managed to find these versions together:

  • xcode 8.2 - 360.1.68
  • xcode 8.1 - 360.1.65
  • xcode 8 - 360.1.50
  • xcode 7.3.1 - 350.0.21
  • xcode 7.3.0 - 350.0.21
  • xcode 7.2 - 340.4.119
  • xcode 7.1 - 340.4.110
  • xcode 7.0 - 340.4.70
{
init: function(elevators, floors) {
var floorButtons = new Array(floors.length);
var floorTime = new Array(floors.length);
var UP = 1;
var DOWN = 2;
var DISABLED = 4;
for (var i = 0; i < floorButtons.length; i++) {
floorButtons[i] = 0;
floorTime[i] = 0;
@indutny
indutny / jit.js
Last active December 27, 2015 02:49
var jit = require('jit.js'),
esprima = require('esprima'),
assert = require('assert');
var ast = esprima.parse(process.argv[2]);
// Compile
var fn = jit.compile(function() {
// This will generate default entry boilerplate
this.Proc(functon() {
commit b8e3d3701ac07d9304aee7cde1f0ebb5e17a8db8
Author: Fedor Indutny <fedor.indutny@gmail.com>
Date: Mon Oct 28 20:43:03 2013 +0400
darwin: avoid calling pGetCurrentProcess
Use some black-magic from Apple to change process name without getting
a "Not responding" tag from Activity Manager.
fix #966
<?xml version="1.0"?>
<!DOCTYPE service_bundle SYSTEM '/usr/share/lib/xml/dtd/service_bundle.dtd.1'>
<service_bundle type="manifest" name="minecraft">
<service name="minecraft" type="service" version="1">
<create_default_instance enabled="true"/>
<single_instance/>
<dependency name="milestone" grouping="require_all" restart_on="none" type="service">
<service_fmri value="svc:/milestone/multi-user"/>
commit 461f784d01a071172ab9a993313db3c00b3a6b5c
Author: Fedor Indutny <fedor.indutny@gmail.com>
Date: Wed Aug 14 17:14:35 2013 +0400
fsevents: FSEvents is most likely not thread-safe
Perform all operation with FSEventStream in the same thread, where it'll
be used.
Conflicts:
commit bda00b93bed86610319f73cc6e857bd6ae05bff7
Author: Fedor Indutny <fedor.indutny@gmail.com>
Date: Thu Jun 20 23:32:26 2013 +0200
couch_users_db: introduce public_users option
When `couchdb.public_users` is set to `true`, getting `/_users/id` will
return user document with sensitive information stripped.
diff --git a/etc/couchdb/default.ini.tpl.in b/etc/couchdb/default.ini.tpl.in
@indutny
indutny / https.js
Last active December 18, 2015 07:00
var cluster = require('cluster');
var os = require('os');
var fs = require('fs');
var https = require('https');
if (cluster.isMaster) {
for (var i = 0; i < os.cpus().length; i++) {
cluster.fork();
}
return;
@indutny
indutny / graph.js
Last active December 11, 2015 20:28
//
// Place in the folder with node's source and run following in bash:
// $ node graph.js 60bf2d6 0d7a021 > graph.log
//
var child_process = require('child_process'),
exec = child_process.exec;
var start = process.argv[2];
var end = process.argv[3];
var bench = process.argv[4];
@indutny
indutny / 0-HOWTO.md
Last active November 4, 2015 17:29
FLUSH+RELOAD in node.js

How to run this

  1. Take any binary that has OpenSSL functions listed in collect.js
  2. Open lldb /path/to/binary
  3. Do disas -n function-name for each function in collect.js
  4. Choose some offset near the end of the function
  5. Subtract 0x1000000000 to get file offset
  6. Put the number in collect.js
  7. Run node collect.js /path/to/binary | node filter.js > log
  8. Let it run for some time to collect enough information