« first day (2446 days earlier)      last day (2502 days later) » 

5:00 PM
@Danack I think that should work fine
 
Anonymous
@WesStark @JayIsTooCommon Did you miss me :p :)
 
hi all
i have a question about a project that im developing
 
oh god damnit, I should proof-read more... In my email subject I mentioned .gov.uk instead of .gov.tld
 
Anonymous
@Kurisu hehe, I found out who you are :)
 
i use a lot of js plugins. What tool you recommend me?
bower with php its possible? webpack maybe?
i create a frontend made with php
backend sorry
 
Anonymous
5:02 PM
js plugins??
 
oh god... now someone knows something about me... I forgot to tie the loose ends
 
@samayo select2, sweetalert, jquery...etc.
plugins, frameworks...
i want a tool who join all js files in a single file
 
@50l3r rm mostly
 
like bower, grunt or webpack
@tereško :_
 
webpack would be the optimal solution
but you are not supposed to run it form PHP
 
Anonymous
5:07 PM
@Kurisu That's one sweet idiom. I like!!
 
@50l3r I'm not aware of PHP based JS build tools
 
nono, i dont find a php based js build
 
Is it a bad idea of instead to use header("Location: url....") to echo "<script>window.location.href = 'view.php';</script>"```
 
i explain my situation
i need to develope a backend in php
with views in html
routes with php
actually i have a angularjs app
but i develop too slow
i have a api rest (baas)
who can manage all data
create, read, update, delete...
i try to develope an angularjs app but i hate angular. Too much different for me.
 
Anonymous
@SamuelFonseca It depends on your situation. But I prefer to not mix js/php in one line if possible
 
5:12 PM
@50l3r What are you familiar with?
 
im a php developer
 
@SamuelFonseca Yes, it's usually a bad idea.
 
i know js but angularjs is too harder for me
 
@samayo that makes sense, my problem is that I am running into a Cannot change header again.
@MadaraUchiha what approach would you take?
 
Anonymous
Then fix that problem first
 
5:13 PM
@SamuelFonseca header()
The problem is that you're calling it too late. You can't call header() after you've already echoed some output.
 
I echo the output in the header section... This doesn't come until later where I submit a form
 
My problem is that while growing my application, you will have many javascript files and you will not need to be loaded
too maby <scripts...
 
@MadaraUchiha ^^^
 
@50l3r Our approach at work is 2 projects
One for the backend, and one for the frontend
 
5:15 PM
Each with a build process of its own
 
my app is a backend with a api rest
the api is ended
i want to develope a php backend with codeigniter
in header and footer files i deploy every js files of my app
jquery, sweetalert, bootstrap...etc.
 
a tremor passed through the air, as @tereško cringe shook the fabric of time and space
4
 
@50l3r Yeah, definitely take a look at webpack and npm packages
 
and how can i implement with php
simply require libraries in my js files?
 
5:18 PM
10 mins ago, by Madara Uchiha
@50l3r I'm not aware of PHP based JS build tools
 
Anonymous
@samayo what did you do :B ?
 
Would I be better off to send the form to a different PHP page and call for the function then? Eliminating the all the output echo? @samayo
 
The way it usually goes is that webpack takes all of your packages and code, does magic, and outputs a single file
You then require only that file in the HTML file you send to the client
That one file (usually named bundle.js) will contain all the relevant parts of all the libraries you include, plus your own code.
 
Anonymous
@SamuelFonseca Well, without looking at your code, it will be hard to say anything. But one way or another find a proper way to fix the header sent error.
 
@FélixGagnon-Grenier Note that both of those links are for a deprecated version of webpack.
 
5:20 PM
orly
 
@kelunik yes, shortly
 
@FélixGagnon-Grenier webpack.js.org/guides/getting-started yes
@50l3r ^
 
@samayo I understand, thank you
 
i know webpack. Actually this is my conf:
 
@MadaraUchiha comething something bookmarks rotting in my browser something something
 
5:21 PM
var webpack = require('webpack');
var ExtractTextPlugin = require("extract-text-webpack-plugin");

if (process.env.arg == "prepro") {
	module.exports = {
		entry: './app/main/core/core.module.js',
		output: {
			path: __dirname + '/build',
			publicPath: '/build/',
			filename: 'bundle.js',
		},
		devtool: '#cheap-module-source-map',
		module: {
			rules: [
				{
					test: /\.html$/,
					use: [{
						loader: 'html-loader',
						options: {
							minimize: true
						}
					}]
				},
				{
					test: /\.css$/,
 
@SamuelFonseca Normally, with a modern web application (and by modern I mean written after 2010), we use AJAX to submit the form without refreshing the page.
@50l3r I recommend strongly that you do not copy/paste configuration and commands you find on the internet until it works.
 
How is that related to being modern :p
 
You should understand the concepts in the tutorial.
 
Hola all
 
5:22 PM
@PeeHaa Hey cowboy.
@PeeHaa POST-Redirect-GET is so 2005
 
Anonymous
@JayIsTooCommon Basically This! I was pissed but I deserved the suspension. But it's not as bad as what @MadaraUchiha said.
 
@samayo Aye, not a staff, but an employer, I read the annotation wrong.
 
Anonymous
I think the guy flagged it and I got a message from mod saying I was suspended for a week. ehh, fair enough!
 
this sounds harsh for a first offense?
 
Anonymous
@MadaraUchiha I don't think the guy I insulted is affiliated with SO. That makes them neither a staff nor an employer, or maybe I am wrong. I thought it was a 3rd party ad.
 
Anonymous
5:28 PM
@FélixGagnon-Grenier I'm just glad I wasn't suspended for a year, like the commonsense guy
 
Anonymous
This and my github account is the first thing I put on my CV :)
 
this is like, orders of magnitude of orders of magnitude more intense
 
@MadaraUchiha I am forwarding the user because he no longer needs to be on that page. The content is no longer relevant once the form is submitted
 
@samayo They're an employer on Jobs, a guy who posted a job offer.
 
I use Ajax to display records, but I didn't find it necessary to use it in the actual form.
 
@SamuelFonseca The general approach to this is to AJAX submit the form, receive an affirmative response from the server, show a success indicator (informing the user that the page is about to be redirected), then redirect them client-side.
The only thing the server should be doing is accept the user's submission, and echo an "OK" message of some sort (usually JSON, because your client is JS)
Deciding what to do with the submission's success or failure is up to the client.
 
@MadaraUchiha that makes sense, I will entertain the idea
 
@MadaraUchiha lol
Ajax is so 2000
 
@PeeHaa Right, use fetch()
 
O/
 
5:32 PM
\O
 
Anonymous
@PeeHaa Axios?
 
Anonymous
I'm hearing that from everywhere.
 
@MadaraUchiha so last month, my webpack now bundles internet so you never have to call antyhing else.
 
!!xkcd web pages
 
5:34 PM
:o
 
Whenever you have a clever idea, assume that XKCD had already thought of it :D
 
Brb smoking
@SamuelFonseca depending on your actual use case it might probably indeed bot be
@SamuelFonseca depending on your actual use case it might probably indeed not be
 
@PeeHaa what do you mean?
 
Anonymous
@samayo hahahaha quality
 
@SamuelFonseca you probably don't need xhr calls to aubmit forms
Again obviously it depends on the actual use case
 
5:47 PM
@bwoebi Could you have a look at github.com/amphp/artax/commit/… as fix for #115 please?
 
Btw @kelunik if I still need to test amp stuff I will be more available again starting from tomorrow
 
@PeeHaa You don't need to, but just run the DNS tests.
 
@PeeHaa my problem with XHR is that I need to get the ID from the databse, and I am using url parameters, I am still troubleshooting similar ajax calls
 
@bwoebi nop
 
@SamuelFonseca don't see how that is a problem
It's all just http requests
 
5:54 PM
my life is complete now github.com/yolojs/yolojs
 
0
Q: Can I develop admin panel in lumen laravel 5.4

user2910231I am using lumen for api development. But now I want to develop an admin panel for the same application Can I do that because as I can see session is not supported in lumen 5.4 Please give me your suggestion . How can I develop admin panel for this application

Can anyone give me answer of this question
 
@AkhileshJha are these both your accounts? the one asking the question, and the one you are chatting with?
 
Judging by the title. Yes why not and closing as too broad
 
No that is not my account Actually I am also facing the same issue
 
@NikiC Are you going to? It turns out to be a bit annoying …
 
6:02 PM
Yes, it's pretty annoying.
 
So I thought if any one of u will help me to get out from this issue
 
Lol same question aaaand asked 20 mins ago
Not fishy at all
 
Actually I googled the same thing and I fond this question on top
 
And I stand by what I said before
 
6:04 PM
sometimes I believe Taylor or some associate are trolling us
 
:p
 
You guys are not understanding my problem
 
no, we do not
I would say, it's because it's not exactly a problem. I don't really understand what is the question to begin with...
 
can you help me to get out from this issue
Do u have knowledge of laravel
 
no, I don't. I do have some knowledge of PHP though, and the answer to the question "Can I develop [something with these tools]", is factually answered by reading the fine documentation provided with these tools.
if, as you say, lumen do not take charge of sessions, then chances are you will have to use another "laravel admin panel".
 
6:09 PM
The entire question doesnt make sense
 
Actually for that I will have to use whole laravel application
I have jsut asked that Can I develop admin panel in lumen 5.4
 
Which is a stupid question and the answer is yes obviously
 
Nite aĺl
 
I had a science teacher in high school who said, when someone asked a dumb question, that "there are no dumb questions, only dumb people". towards the end of the year, we all asked way better questions.
also I'm jealous @PeeHaa, your user id has an 666 in it.
 
lol
 
6:25 PM
@kelunik uhm, isn't that a nice infinite loop for streamed responses?
 
@AkhileshJha lumen is a framework written in php it probably can do what php can don't you think
 
wasn't php written in laravel?
 
Heheh
 
I come across a project a Social App. How much money should I ask for?
 
42
 
6:30 PM
Equity better?
 
42
I have been away for a couple of days and suddenly the entire room is filled with weird random nonsensical questions
Tnx @FélixGagnon-Grenier
 
Anything you need ;)
 
@bwoebi Max body bytes will catch it. If you disable that, you're responsible for handling that.
We could also close the connection in that case.
 
@kelunik yes, we should.
 
@PeeHaa we tried to fill in for you the best we could
 
6:46 PM
@bwoebi And how would that check look like?
 
room, de we have a crash no nonsense docker howto, that don't take you by the hand? I have general knowledge, I use it weekly, I am aware of docker-compose, but I feel I lack the uniting thread between all the dots
 
^ I'd prefer reading something like that as well.
 
@kelunik basically closing the connection if not all bytes are in buffer yet
 
@bwoebi So just examining content length?
 
@kelunik I'm not too familiar with the inner workings right now … but isn't the socket immediately put back into pool once the response has is fully buffered?
 
6:53 PM
@Gordon oh gawd
 
@bwoebi The response isn't buffered at any time unless you yield the Message.
 
 
1 hour later…
8:03 PM
websites with shortcuts freak me out
I start typing, thinking I'm in my vm's console, than I look aside, I have opened a new issue in Jira, assigned a ticket to the boss, and created a public repo named @PeeHaa's mum on github.
 
Anonymous
What was the wget commans to download from links in a file
 
Anonymous
I think it was wget -i urls.txt
 
Anonymous
but it doesn't work :\
 
8:31 PM
!!rfcs
 
8:57 PM
My boss just gave me the task of creating a WP plugin which prevents CRSF on any existing WP installation.

I may be wrong here...but that is not even theoretically possible, is it?
I can't force all AJAX requests to get my token.
 
Nite all o/
 
lol
@Allenph wp has csrf protection in form of nonces which are a token
 
@RonniSkansing Well, yes.
But I can't force other plugins to implement that in their forms.
 
it's a bit problematic yes
and no you cant know what kinda of crazy stuff peoples plugins and themes do
you could look into patching the cookies to have the samesite attribute
 
@MadaraUchiha ??? This is my configuration.
 
9:09 PM
which would migrate some issues but not all, and only in chrome or whatever has implemented it
 
@RonniSkansing I think I'll just tell my boss that we need to look at the forms and that my initial impression was correct.
That is impossible.
 
@50l3r well, one can seriously doubt that you really wrote it, especially because two minutes before pasting "your" config file, you showed without a doubt that you did not understand webpack and what it does:
ok, maybe that proof is a bit mean, but you get what I mean.
 
you dont understand me
 
5
A: Escaping %’s in file-/folder-names at the command-line

BobSomething odd happened to me when I tested this. dir "C:\Program Files\^%temp^%" For some reason, it appears the quotes interfere with the escaping. If I escape the quotes too, it works. dir ^"C:\Program Files\^%temp^%^" It looks ugly, but it works. If there are no spaces in the path, the ...

fuck the windows command line
 
i know webpack and bower
and angularjs
but i find an alternative who uses with my php backend
@FélixGagnon-Grenier if you read the code, domain gestios.com and gestios.loc are vhost to my apache server
i configured a proxy who uses /api for my php api rest
maybe i dont explain very well. im spanish sorry
 
9:22 PM
@50l3r yes, I don't understand. On one hand, you say that you want a way to manage your js dependencies (which is exactly what webpack does) but on the other hand you say you already use webpack, hence my confusion.
I guess it's the "link it with php" part on which I'm unclear.
 
i want to change my app code. I dont like angularjs and im exploring new alternatives
the easiest way its develop a backend with codeigniter php framework
use mvc with codeigniter views
 
so you would replace angularjs with codeigniter views, correct?
 
all mvc app
with routes, controllers, models...
i need a tool who's help me to organize js libraries like select2, sweetalert, ...etc etc
preventing specify all js files in the code and possibly using a tool who compile all in one bundle file
like bower or wepack
maybe i can user bower
 
ok, I guess we're on the same page ;)
so what is your question? where are you actually stuck?
I would use webpack, because I like it. Bundles everything in one file, does all teh things, lets you use all these fancy new js syntax sugars.
 
i can use only to compile my js files? What's the best way to organize my js files in a bigger app?
i never use webpack with php. Maybe its not posible.
different concepts
 
9:30 PM
yes it is, I literally do it on a daily basis
 
mmm any start point?
 
create a folder called js, out of the public folder. create a file called index.js in that folder. In that file, use the imports/requires you will need to register listeners on the elements of your html.
then, configure webpack with that index.js as an entry file, bundle it in the public/ folder, and include this single script in your global html template
 
an example
i have multiple routes
/path-1
/path-2
with different js files
i need multiple index.js files for every path?
 
that becomes a webpack question, how to have multiple entry points and outputs. Or you can just bundle everything with all pages if the file size is not exactly a problem
... I typically bundle everything, and load that file everywhere.
 
mm its a thing
Many times I complicate my life
xD
 
9:36 PM
it's arguably not a best practice, but it's much simpler
 
much thanks :)
 
sure, I apologize for being rash.
 
jaja, no problem :)
see you
 
@50l3r I have a React skeleton app, that I need to polish up a lot - but shows how to configure webpack mostly: github.com/danack/reactTutorial
@FélixGagnon-Grenier Do you guys use ES2015 yet? And/or do you bother compiling down to a lower spec for shitty browsers?
 
9:55 PM
@Danack we write in it, than compile down
 
With the babel plugin?
 
yep
"babel-eslint": "^7.1.1",
"babel-loader": "^6.2.10",
"babel-plugin-transform-class-properties": "^6.18.0",
"babel-plugin-transform-object-rest-spread": "^6.22.0",
"babel-preset-es2015": "^6.14.0",
"babel-preset-react": "^6.11.1",
the transform plugins are arguably me being lazy and liking the {...object}
ewww that's old sorry.
 
....nothing wrong with that.
 
:o
@Danack oh I see you went full hipster with yarn. satisfied with it?
 
it seems to work - but we're miles off using it for a producition app.
 
10:05 PM
the biggest disappointment I've had with working with js during last year has been npm. coming from composer, it feels brittle as hell. it was my hope that yarn would help bring some feeling of security, mostly through the lock file, but I haven't been able to push that on a project yet.
 
how do you feel about npm5 then?
 
@50l3r are you aware that it's oxymoron? I am about 99.99% sure, that what you are doing with codeigniter is not MVC.
 
@RonniSkansing we haven't bumped versions yet :D
 
oh okay (=... well the real npm security lately was their lack of throttling and abondance of users with weak/recycled passwords
Im not sure packagist would do much better, but meh dunno
 
@RonniSkansing "login with github" :D
 
10:09 PM
(=
 
this looks like one of the monsters in mario bross
holy. fuck. bros. as in bro[ther]s
on my life, since I was a kid, I just pronounced it in french, bros, and never thought of it.
 
well they accept extremely weak pwds such as 1234
 
plays aoe3
@WesStark finaally bought it ^
 
10:25 PM
I wanna highlight a matching string, including the line before it (if it exists), that line, and the line after it (if it exists). Could somebody recommend a good way to do that?
 
regex
or some string operations
 
@RonniSkansing i just didn't know how to do the (if the line before it exists) part.
 
10:51 PM
In php, sounds like something you would want to do in js maybe?
 
@kelunik ah, well. Then, yes.
 

« first day (2446 days earlier)      last day (2502 days later) »