Skip to content

Instantly share code, notes, and snippets.

🐋
Thanks for the fish!

Fedor Indutny indutny

🐋
Thanks for the fish!
View GitHub Profile
View baumgarte-2.32.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@indutny
indutny / 00-totp.js
Last active Feb 28, 2020
TOTP collisions
View 00-totp.js
const { authenticator, hotp } = require('otplib');
const SECRET = authenticator.generateSecret();
const map = new Map();
const TOTAL = 100000;
const MAX_DIFFERENT = 1000000;
const STEP = 30;
const OFFSET = (Date.now() / 1000 / STEP) | 0;
@indutny
indutny / ExeLDR.asm
Created Dec 31, 2010
Loader for MSDOS EXE files, without MSDOS
View ExeLDR.asm
;Made by FeDOS (FeDOS SubSystems)
;All Rights Reserved
;FeDOS (ICQ 313-997-813)
[BITS 16]
[ORG 0x0000]
__start:
; mov cx, 0xB800
; mov es, cx
; mov bx, 0h
; mov cx, cs
View twitter-contest.js
!function() {
// Don't forget to scroll all the way down to load all replies!
const elems = document.body.querySelectorAll(
'div.original-permalink-page ' +
'li.ThreadedConversation:not(.ThreadedConversation--selfThread),' +
'li.ThreadedConversation--loneTweet');
for (const elem of elems) {
elem.style.border = '2px solid green';
View quiz.js
'use strict';
// Quiz:
//
// Implement `solution` function using only calls to API methods below and no
// other JS primitives (even math).
//
// Correct implementation will print "Success!" once executed
//
@indutny
indutny / crypto-browserify.svg
Last active Jul 4, 2017
crypto-browserify CommonJS dependency graph.
View crypto-browserify.svg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@indutny
indutny / info.md
Last active Nov 22, 2016
"Xcode - lldb" version correspondence
View info.md

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
View elevator-saga.js
{
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;
View jit.js
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() {
View darwin-0.10.patch
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
You can’t perform that action at this time.