Skip to content

Instantly share code, notes, and snippets.

View seishun's full-sized avatar

Nikolai Vavilov seishun

View GitHub Profile
@seishun
seishun / app.js
Created June 4, 2017 21:18
stupid translator bot
const Discord = require("discord.js");
const translate = require('google-translate-api');
const client = new Discord.Client();
client.on('ready', () => {
console.log(`Logged in as ${client.user.username}!`);
});
@seishun
seishun / day5.js
Created December 5, 2016 18:57
Solution for Advent of Code 2016 day 5 part 2 in Node.js
const crypto = require('crypto');
const input = process.argv[2];
console.log(input);
let filled = [];
let remaining = 8;
for (let index = 0; remaining; index++) {

Keybase proof

I hereby claim:

  • I am seishun on github.
  • I am seishun (https://keybase.io/seishun) on keybase.
  • I have a public key whose fingerprint is BE28 4DB1 7CF3 9015 E1E5 5C25 049E B640 2C40 A74E

To claim this, I am signing this object:

var buf = require('crypto').randomBytes(1024);
var zlib = require('zlib');
function doNothing() {}
var count = process.argv[2] || 1;
for (var i = 0; i < count; i++) {
zlib.deflate(buf, doNothing);
}
@seishun
seishun / givebadgeplz.js
Created September 25, 2013 21:41
How to get the dumb gamepad task done
var fs = require('fs');
var Steam = require('steam');
var bot = new Steam.SteamClient();
bot.logOn({
accountName: 'username',
password: 'password',
shaSentryfile: fs.readFileSync('sentry')
});
var link = 'http://google.com/search?q=1234&hl=ru';
require('superagent')
.get(link)
.end(function(res) {
var $ = require('cheerio').load(res.text);
var stats = $('#resultStats');
console.log(stats.text());
});