mardi 11 octobre 2016

How to learn JavaScript with confidence

If you're lost among all the JavaScript frameworks, if you're still hesitating between all the different tools to use, if you're scared by the JavaScript ecosystem complexity, have a look to my post on hello.js :

How to learn JavaScript with confidence

Things might not be as bad as it seems...

lundi 29 août 2016

Change your Gogs admin password

I might have missed something, but I haven't found any simple way to change my admin password (with emailing not active) in gogs.

It was quite easy to find the hash location, but as I didn't know how it was generated...

Luckily I eventually found the parameters used, so here it is for you if you need them embedded in a script :

var pbkdf2 = require('pbkdf2-sha256');
var key = 'YourChosenPasword';
var salt = 'AnyRandomValue';

var hash = pbkdf2(key, salt, 10000, 50); console.log(hash.toString('hex'));

All I had to do was then to update the table user, setting passwd to the generated value (and updating salt with the value used in the script).