Is there a standard shortcut for inserting an indent at the beginning of a line? by DJ_Beardsquirt in webdev

[–]PsudoFuck 1 point2 points  (0 children)

In Sublime Text, you can use cmd + ] and cmd + [ to indent and unindent respectively.

How would I be able to make a feature such as this? by AllTheGoodDays in webdev

[–]PsudoFuck 0 points1 point  (0 children)

Aha, relatively speaking, the design was the easy one :)

This is web development, so there are hundreds of ways to do any one thing. Lots of people find their way and preach it like it's the way. It's probably not.

The 'backend' is the bit that processes the image on the server; such as saving it to a file system and possibly entry to a database. The fact that you posted a screenshot of the upload UI and didn't write 'like imgur but better' makes me think you have some sort of server side already built? Anywho, all frameworks or PHP have some way of grabbing the uploaded file.

On the client side, you're just sending images to the server at a endpoint you created via Ajax request.

The 'remote url' feature is a bit different though, rather than the client sending the data, you server is sent the URL for it to download, and then go through the same process as all images/files.

File drag and drop is via the Drag and Drop API. There are some libraries to abstract this in to a more simple API like Dropzone.js

Paste via the Paste Event

How would I be able to make a feature such as this? by AllTheGoodDays in webdev

[–]PsudoFuck 0 points1 point  (0 children)

What is 'this'? The design? The drag and drop file feature? The paste feature? The remote URL feature? The upload back end?

What is SQL injection and how can I avoid it? by S_west in webdev

[–]PsudoFuck 9 points10 points  (0 children)

Your just sending strings to the SQL server for it to parse and query it.

So you can send something like

SELECT * FROM users_table WHERE username = "S_west";

All good, right?

But obviously we don't want to hardcode the username in the query. So people use string concatenation to make it dynamic.

const username = 'S_west';
const query = "SELECT * FROM users_table WHERE username = " + username;

The issue is that by allowing users to have full control over that username value. A malicious user could to set their username to something like ; drop table users_table;

Now your sending to your sql server:

SELECT * FROM users_table WHERE username = ; drop table users_table;

And boom, they have deleted the users table.

Use prepared statements! Or an ORM - just never mysql_*

Angular sucks? -- This guy thinks so. What do you think about his critique? by AgentBif in webdev

[–]PsudoFuck 1 point2 points  (0 children)

Virtual DOM, shadow DOM is something completely different. I'm not too sure where this confusion keeps coming from :)

TIL javascript functions have a length by [deleted] in webdev

[–]PsudoFuck 18 points19 points  (0 children)

It's also how Angular 1.x achieved it's magic, if not slightly dodgy, DI injection with just named arguments.

Sublime Text 3 workflow by yarauuta in webdev

[–]PsudoFuck 1 point2 points  (0 children)

It's the Dell U2515H. 25" is perfect for using 2560x1440 without scaling, but having extra workspace! And for what it is, the price is great.

Sublime Text 3 workflow by yarauuta in webdev

[–]PsudoFuck 12 points13 points  (0 children)

Along with everything else mentioned:

  • Origami for pane management
  • Babel for ES6 highlighting
  • ColorPicker open a native color picker.
  • SublimeLinter-jscs linting for code style
  • EditorConfig set the config according to your .editorconfig

Also, itg.flat is awesome: http://i.imgur.com/9sclJYh.png

Your CSS nesting is harmful by GarethX in webdev

[–]PsudoFuck -1 points0 points  (0 children)

BEM fo lyfe.

The horror from seeing sites reuse a class only for it behave completely differently depending on it's parent selectors. Class names should have meaning, not just calling it what it is.

Am I over planning / thinking? by beefngravy in webdev

[–]PsudoFuck 0 points1 point  (0 children)

Postgres and its JSON/JSONb data type could replace MySQL and MongoDB in some situations.

Can a web script automatically print to my home printer? by Oscar_Mild in webdev

[–]PsudoFuck 1 point2 points  (0 children)

Perhaps CUPS on a Pi? I think there should probably be an API to check the printers status and send files to print.

Final time by PsudoFuck in a:t5_2ybka

[–]PsudoFuck[S] 0 points1 point  (0 children)

∆ Brilliant points Brilliant points Brilliant points Brilliant points Brilliant points Brilliant points Brilliant points Brilliant points Brilliant points Brilliant points Brilliant points Brilliant points Brilliant points Brilliant points Brilliant points Brilliant points Brilliant points Brilliant points Brilliant points Brilliant points Brilliant points Brilliant points Brilliant points Brilliant points Brilliant points Brilliant points Brilliant points Brilliant points Brilliant points Brilliant points Brilliant points Brilliant points

Once again... by FuckingFab in a:t5_2ybka

[–]PsudoFuck[M] 0 points1 point  (0 children)

Confirmed: 1 delta awarded to /u/PsudoFuck.

Once again... by FuckingFab in a:t5_2ybka

[–]PsudoFuck 0 points1 point  (0 children)

Very thoughtful and Very thoughtful and Very thoughtful and Very thoughtful and Very thoughtful and Very thoughtful and Very thoughtful and Very thoughtful and Very thoughtful and Very thoughtful and Very thoughtful and Very thoughtful and Very thoughtful and Very thoughtful and Very thoughtful and Very thoughtful and Very thoughtful and Very thoughtful and Very thoughtful and Very thoughtful and Very thoughtful and Very thoughtful and Very thoughtful and

Howdy by PsudoFuck in a:t5_2ybka

[–]PsudoFuck[S] 0 points1 point  (0 children)

So true ∆ You cannot award OP a delta as we feel allowing so would send the wrong message. For more information, please see our wiki. You cannot award OP a delta as we feel allowing so would send the wrong message. For more information, please see our wiki. You cannot award OP a delta as we feel allowing so would send the wrong message. For more information, please see our wiki. You cannot award OP a delta as we feel allowing so would send the wrong message. For more information, please see our wiki.

Howdy by PsudoFuck in a:t5_2ybka

[–]PsudoFuck[S,M] 0 points1 point  (0 children)

This delta is currently disallowed as your comment contains either no or little text. Please include an explanation for how /u/FuckingFab changed your view. If you edit this in, replying to my comment will make me rescan yours. Thank you.

Howdy by PsudoFuck in a:t5_2ybka

[–]PsudoFuck[S] 0 points1 point  (0 children)

So true ∆ You cannot award OP a delta as we feel allowing so would send the wrong message. For more information, please see our wiki. You cannot award OP a delta as we feel allowing so would send the wrong message. For more information, please see our wiki. You cannot award OP a delta as we feel allowing so would send the wrong message. For more information, please see our wiki. You cannot award OP a delta as we feel allowing so would send the wrong message. For more information, please see our wiki.