Skip to content

Instantly share code, notes, and snippets.

@aheckmann
aheckmann / burn.md
Last active January 5, 2023 22:53
How to get rid of Solana spam NFTs
  1. Open a private tab
  2. Create a completely new wallet by visiting https://www.sollet.io
  3. You will see a screen displaying "Create new wallet" and a list of seed words
  4. Copy the seed words
  5. Check the box next to "I have saved these words in a safe place."
  6. Click "DOWNLOAD BACKUP MNEMONIC FILE (REQUIRED)". This downloads your seed phrase. Delete this file.
  7. Click "continue"
  8. Paste the seed words when it asks you to, then click continue
  9. Click "Main Account" at the top of the screen to copy the new wallet address. This address is where you'll send your spam NFTs.
  10. Open your Phantom wallet (assuming you are using Phantom)
'use strict';
// run using this fork of NodeJS
// https://github.com/targos/node/commits/v8-5.4 (https://github.com/nodejs/node/pull/8317)
//
// node --harmony_async_await await_thenables.js
function counter(count) {
return {
then: function(res, rej) {
var LRU = require('lru-cache');
var i = 0;
var sets = 0;
var start = Date.now();
var last = Date.now();
var max = 8193; // 8192 is the magic number upper perf limit of plain objects
var maxAge = 1000 * 60 * 60 * 24;
@aheckmann
aheckmann / parallelism.js
Created January 28, 2015 02:25
configurable parallelism
/**
* example of configurable parallelism
*/
// silly counter
var i = 0;
// configurable amount of work to run in parallel
var max = 1;
@aheckmann
aheckmann / gist:2647d4afe7d0bb760e49
Created September 12, 2014 18:18
connect to compose.io replset with mongo shell
mongo -u USERNAME -p PASSWORD --host "REPLICA_SET_NAME/HOST:PORT" --authenticationDatabase DB_NAME
# after connected, you'll need to change the database
// db = db.getSiblingDB(DB_NAME);
@aheckmann
aheckmann / README.md
Last active December 30, 2015 02:19
bottleneck in amqp.js when publishing large numbers of messages using confirms. see README.md

run this with > time DEBUG=amqp:* COUNT=30000 PREFETCH=0 BUCKET_SIZE=20000 node index.js

before applying the fix:

real  1m22.216s
user  1m10.973s
sys 0m16.106s
@aheckmann
aheckmann / generator-fodder
Created September 17, 2013 14:42
some resources for understanding ES6 generators.
http://swannodette.github.io/2013/08/24/es6-generators-and-csp/
https://github.com/visionmedia/co
http://wiki.ecmascript.org/doku.php?id=harmony:generators
http://pag.forbeslindesay.co.uk/
var assert = require('assert')
var uri = 'mongodb://localhost/findAndModifyBug';
var mongo = require('mongodb')
console.log('driver version: %s', mongo.version);
mongo.connect(uri, function (err, db) {
if (err) throw err;
console.log('connected');
@aheckmann
aheckmann / mongoose-cpu-load-test.js
Created August 28, 2013 03:00
tweak various mongoose settings to observe cpu impact.
/**
* configuration
*/
// connection pool size
var poolSize = 5;
// number of parallel queries
var n = 60;
@aheckmann
aheckmann / 1652.js
Last active December 21, 2015 09:49
var mongoose = require('mongoose');
var Schema = mongoose.Schema;
var assert = require('assert')
console.log('\n===========');
console.log(' mongoose version: %s', mongoose.version);
console.log('========\n\n');
var dbname = 'goosetest-1652';