Skip to content

Instantly share code, notes, and snippets.

View sjinks's full-sized avatar
🪖
#StandWithUkraine

Volodymyr Kolesnykov sjinks

🪖
#StandWithUkraine
View GitHub Profile
@sjinks
sjinks / extract.js
Created November 20, 2019 19:19
Extracts sources form a sourcemap - quick and dirty
const sourceMap = require('source-map');
const fs = require('fs');
const path = require('path');
const fg = require('fast-glob');
(async function() {
const entries = await fg('*.map');
entries.forEach(async (fname) => {
const consumer = await new sourceMap.SourceMapConsumer(JSON.parse(fs.readFileSync(fname)));
for (const source of consumer.sources) {
@sjinks
sjinks / testcase.php
Last active May 5, 2018 17:37
Memory corruption in PHP
<?php
class Body
{
private $r;
public function __construct($x)
{
$this->r = $x;
}
}

Keybase proof

I hereby claim:

  • I am sjinks on github.
  • I am sjinks (https://keybase.io/sjinks) on keybase.
  • I have a public key whose fingerprint is 24E3 1E09 E83F EFB1 05F8 49DC 70C0 8528 A9DF B9E6

To claim this, I am signing this object:

#!/bin/sh -e
# Prereqs:
# apt-get install lxc lxc-templates --no-install-recommends
#
# For unprivileged container:
# apt-get install --no-install-recommends uidmap
CONTAINER=debian