2,849 karma · joined Oct 29, 2013 (13y ago) · 2,019 submissions
comment 9y ago · link · parent
I really like .NET Core but this RazorPages is just single worst "improvement" for the .NET Core platform.
I even remember watching the presentation on BUILD conference and nobody applauded at this "feature" when they graciously introduced it and you could feel the cringe. Scott even had to say "Isn't this awesome!?? Come on!".
No, Scott, it's not awesome. It's going backwards.
comment 9y ago · link · parent
- http://paulocoelhoblog.com/2015/09/04/the-fisherman-and-the-...
comment 9y ago · link · parent
For example:
Back-end renders page and something crashes - you get 503 error and you know to refresh the page or contact support or w/e.
Shitty web-app loads multiple components via AJAX, doesn't even check for errors, some components do not load, you have no idea what the heck is happening so all you can do is inspect the JSON response in the devtools.
comment 9y ago · link · parent
This is ridiculous advice for someone who is in U.S. So you want him to get into a huge debt w/o even knowing what he wants to do?
OP, if you want to find what you want to do or just "find yourself" don't bother wasting money and time at college and just travel for 6 months to some remote place and live there with locals.
comment 9y ago · link · parent
IMO there should be a line of what to outsource and what to build yourself. In my mind simple things like this go into second category.
comment 9y ago · link · parent
const express = require('express')
const app = express()
const puppeteer = require('puppeteer')
const uuidv1 = require('uuid/v1')
const fs = require('fs')
const validUrl = require('valid-url')
app.get('/', function (req, res) {
(async () => {
const url = req.query.url;
if (!url) {
return res.send({error: 'Need to specify url param e.g. ?url=https://google.com/'});
}
if (!validUrl.isUri(url)) { // Also protects against file://...
return res.send({error: 'url not valid'})
}
const id = uuidv1();
const browser = await puppeteer.launch();
const page = await browser.newPage();
await page.setViewport({ width: 1920, height: 1080})
await page.goto(url)
const buffer = await page.screenshot({path: id + '.png'})
const fullPath = __dirname + '/' + id + '.png';
res.sendFile(fullPath, function () {
fs.unlink(fullPath)
})
await browser.close()
})();
})
app.listen(3000, function () {
console.log('Example app listening on port 3000!')
})comment 9y ago · link · parent
- Air humidifier
- Boose QC35
- 27 inch 4k monitor
- Mechanical keyboard
- Gaming mouspad + gaming mouse
- Huge desk
I seriously don't get why would anyone go to coffee shops to work. Seems totally counter-intuitive to me.
Staring at 13 inch screen without mouse and using not-so-good keyboard seems just waste of my time. Not to mention small tables they have there.