• Web Dev Questions That Don't Need Their Own Thread v4
    5,001 replies, posted
[QUOTE=Banana Lord.;45919838]Okay, I know I've asked this before but I want to ask it one more time and hopefully figure out a solution that works. How are you supposed to develop a PHP site locally and only push working commits to a git repo? My laptop is Windows 8.1. I want to develop a site with the Laravel framework using the PHPStorm IDE. The site is running on my Debian 7 VPS. I don't see how I'm supposed to be able to test my site locally before pushing the commit (and therefore removing the need for 20 follow commits to tweak a webpage). I believe I could install PHP locally as well as track down/install the modules I'd need, but that doesn't help that my PHP site would be using a MySQL database. I'm not about to open up my MySQL server to public connections just so I can develop my site. What am I missing here? Is it possible to have a usable workflow for a PHP site that is deployed remotely? Or do I have to do every change in an editor like vim in SSH right on the server itself? This is driving me absolutely mad. I want to develop a site but I'm turned off by the workflow here. At least with Java I could test everything locally before pushing a commit, but it seems like there's no winning with PHP.[/QUOTE] Use [url=http://vagrantup.com]Vagrant[/url]. [editline]8th September 2014[/editline] [url=https://github.com/rocketeers/rocketeer]Rocketeer[/url] is a fantastic alternative to Capistrano if you need it.
[QUOTE=Banana Lord.;45919838]Okay, I know I've asked this before but I want to ask it one more time and hopefully figure out a solution that works. How are you supposed to develop a PHP site locally and only push working commits to a git repo? My laptop is Windows 8.1. I want to develop a site with the Laravel framework using the PHPStorm IDE. The site is running on my Debian 7 VPS. I don't see how I'm supposed to be able to test my site locally before pushing the commit (and therefore removing the need for 20 follow commits to tweak a webpage). I believe I could install PHP locally as well as track down/install the modules I'd need, but that doesn't help that my PHP site would be using a MySQL database. I'm not about to open up my MySQL server to public connections just so I can develop my site. What am I missing here? Is it possible to have a usable workflow for a PHP site that is deployed remotely? Or do I have to do every change in an editor like vim in SSH right on the server itself? This is driving me absolutely mad. I want to develop a site but I'm turned off by the workflow here. At least with Java I could test everything locally before pushing a commit, but it seems like there's no winning with PHP.[/QUOTE] I just run XAMPP locally - just need to remember that rewrite rules are different but otherwise you have same environment really. You develop, add some random values for testing like normal (if you use SQL). Then when you want to deploy you might want to make a seperate folder where you copy the 'version' and change the config so you don't have to do it after uploading. Also remember to update any eventual MySQL changes, for safety measures putting your site into maintanence mode isn't a bad idea. Especially if you're completely lost :P
I'm like an hour of work from done with [url]http://rbmedia.se/gfx/avesina[/url] The CSS is a clusterfuck since I had to complete the desktop version in 7 days, but I'll scimm through it and clean up as much as I can before I minify it. It runs on PHP(Wordpress), jQuery and Angular(ng-pageslide-directive). I'm now finished with the mobile version, but I still have an issue with the desktop version; These "puffs" below the image slider is partially bugged. [img]http://i.imgur.com/IinL9jg.png[/img] If you look at the bottom-right corner, it looks like the pink arrow is not aligning to the right properly, but it is. However, I got this rare case of "[URL="http://ejohn.org/blog/sub-pixel-problems-in-css/"]sub-pixel sizing[/URL]" error that I just can't get rid of. I didn't have these pink arrows there in the beginning, and the issue existed then aswell, I just "solved" it by adding the same background color the puffs have to the row they are in. Now I have to color that small part by adding another pink arrow in the background and align in bottom-right corner aswell, but I just can't figure out how. Any clues?
Ive been trying to figure this out for a little over a week now. Im basically trying to make a script to start/restart/stop my servers that are hosted on the same box(windows) as my webserver. This would be perfect for me, but the link is broken: [url]http://facepunch.com/showthread.php?t=1352020[/url] Anyone got any ideas? Ive tried using everytype of exec function in php but it always runs it in the backgroup/nogui, so basically it wont start the server. Thanks, C.
[QUOTE=Svenskunganka;45940894]I'm like an hour of work from done with [URL]http://rbmedia.se/gfx/avesina[/URL] The CSS is a clusterfuck since I had to complete the desktop version in 7 days, but I'll scimm through it and clean up as much as I can before I minify it. It runs on PHP(Wordpress), jQuery and Angular(ng-pageslide-directive). I'm now finished with the mobile version, but I still have an issue with the desktop version; These "puffs" below the image slider is partially bugged. [IMG]http://i.imgur.com/IinL9jg.png[/IMG] If you look at the bottom-right corner, it looks like the pink arrow is not aligning to the right properly, but it is. However, I got this rare case of "[URL="http://ejohn.org/blog/sub-pixel-problems-in-css/"]sub-pixel sizing[/URL]" error that I just can't get rid of. I didn't have these pink arrows there in the beginning, and the issue existed then aswell, I just "solved" it by adding the same background color the puffs have to the row they are in. Now I have to color that small part by adding another pink arrow in the background and align in bottom-right corner aswell, but I just can't figure out how. Any clues?[/QUOTE] [code] .puffButton { position: absolute; bottom: 0; right: -1px; /* This will do it */ background: none; padding: 0; margin: 0; } [/code] Just moving it to the right 1 pixel more will do it, noticed it was already absolute so it's a very minor change. [editline]11th September 2014[/editline] You might want to set it back to 0 at tablet sizing so it doesn't go outside the box.
Your search box is an odd shape too. [IMG]http://puu.sh/bupAx/3d7be639bd.png[/IMG] I'm on Windows using Chrome.
[QUOTE=BeatAlex;45948612]Your search box is an odd shape too. [IMG]http://puu.sh/bupAx/3d7be639bd.png[/IMG] I'm on Windows using Chrome.[/QUOTE] His search is fine for me, are you zoomed in on the page?
[QUOTE=Moofy;45949360]His search is fine for me, are you zoomed in on the page?[/QUOTE] Weird then. Nope, I'm at 100%. If I zoom out to 90% it fixes itself. I checked Internet Explorer and Firefox and it looks perfect on there, so maybe just an odd Chrome bug.
[QUOTE=Moofy;45948084][code] .puffButton { position: absolute; bottom: 0; right: -1px; /* This will do it */ background: none; padding: 0; margin: 0; } [/code] Just moving it to the right 1 pixel more will do it, noticed it was already absolute so it's a very minor change. [editline]11th September 2014[/editline] You might want to set it back to 0 at tablet sizing so it doesn't go outside the box.[/QUOTE] Thanks for the input, but I've tried this already. The issue with sub-pixel sizing is that it doesn't happen all the time. In my case 50% of each browser resize. Try resizing the window "pixel by pixel" and you'll see that the arrow starts to flicker forth and back into position, so if I would add this, the arrow would go past the container sometimes aswell.
[QUOTE=Svenskunganka;45950857]Thanks for the input, but I've tried this already. The issue with sub-pixel sizing is that it doesn't happen all the time. In my case 50% of each browser resize. Try resizing the window "pixel by pixel" and you'll see that the arrow starts to flicker forth and back into position, so if I would add this, the arrow would go past the container sometimes aswell.[/QUOTE] No clue then, I tried almost everything now. I can get it in place in a lot of ways but I see what you're saying with the pixel thing. Can't you just use my previous example and make a media query for that tablet sizing? It only seems to jump out one time that way and doesn't jump between pixels like you say.
I'm trying to find a good example on a personal website where can put and publicize your work and portfolio assets. I'm striving for a clean infograph-like look with a menu, either on the side (desirably the right side) or the top. Anyone got a good example or a site with a collection of different website layouts? [editline]11th September 2014[/editline] After some search, I can hint that the themes can be based on Bootstrap and Foundation front-ends.
I am looking for some reccomendations on webhosting. I want to put up a personal website and throw shit I work on it to show it off. Does anyone know any companies that are cheap and reliable?
[QUOTE=Knoxed;45961219]I am looking for some reccomendations on webhosting. I want to put up a personal website and throw shit I work on it to show it off. Does anyone know any companies that are cheap and reliable?[/QUOTE] [url]http://www.deroyalservers.com/[/url] [url]http://www.elpishost.com/[/url]
Nevermind fixed my issue with JQuery
[QUOTE=JohnWallace;45962544][url]http://www.deroyalservers.com/[/url] [url]http://www.elpishost.com/[/url][/QUOTE] this and LithiumHosting
[QUOTE=Moofy;45967766]this and LithiumHosting[/QUOTE] I would have previously recommended Lithium but I switched from them to DoRoyal over a year ago due to constant issues and downtime, along with the fact they refused to open incoming ports so I couldn't use SourceBans among other things.
[QUOTE=JohnWallace;45970336]along with the fact they refused to open incoming ports so I couldn't use SourceBans among other things.[/QUOTE] What incoming ports would you need with a web hosting service besides 80/443 and how would you even listen on them? Get a VPS instead for that stuff
[QUOTE=Goz3rr;45972329]What incoming ports would you need with a web hosting service besides 80/443 and how would you even listen on them? Get a VPS instead for that stuff[/QUOTE] SourceBans requires additional ports. It's outgoing though, it tries to listen / connect to the gameservers using a certain port and if it's closed it won't work.
[QUOTE=Cyberuben;45972355]SourceBans requires additional ports. It's outgoing though, it tries to listen / connect to the gameservers using a certain port and if it's closed it won't work.[/QUOTE] The server port (e.g. 27015) also needs to be opened for UDP incoming otherwise the server status won't display (Error connecting). Functionally everything else works iirc just actually seeing if a server is online and who's playing doesn't.
[QUOTE=JohnWallace;45972593]The server port (e.g. 27015) also needs to be opened for UDP incoming otherwise the server status won't display (Error connecting). Functionally everything else works iirc just actually seeing if a server is online and who's playing doesn't.[/QUOTE] Yeah, guess how much shared hosting likes that... Are you sure it's port 27015 though? I believe they just queried the server, rather than the other way around? (aka, it only had outgoing connections, not incoming)
[QUOTE=JohnWallace;45972593]The server port (e.g. 27015) also needs to be opened for UDP incoming otherwise the server status won't display (Error connecting). Functionally everything else works iirc just actually seeing if a server is online and who's playing doesn't.[/QUOTE] Then what the hell would be listening on port 27015 when you're renting a web server? There's no reason for them to be accepting incoming traffic on any other port besides 80/443 (and 21 for ftp etc). You can open a socket from PHP or whatever to do a Source Engine Query but that's an outgoing connection
[QUOTE=Cyberuben;45972679]Yeah, guess how much shared hosting likes that... Are you sure it's port 27015 though? I believe they just queried the server, rather than the other way around? (aka, it only had outgoing connections, not incoming)[/QUOTE] I'm not 100% sure why it was necessary but it definitely needs 27015/etc on UDP incoming: [url]http://web.archive.org/web/20131212065005/http://sourcebans.net/node/25[/url] (their main site has had a redesign so it looks like the page is gone now but you can see it archived and it is still accurate that this is needed for SourceBans to function properly) [editline]14th September 2014[/editline] Here's the link to the old Community SourceBans (14~ servers across 4 or 5 communities) that I ran for The Hidden: Source until an EP1 engine update killed Linux servers: [url]http://bans.ptga.me/[/url] All the servers are gone now but for testing purposes I've added two random Garry's Mod servers so you can see the issue. Ports 27015-27025 are open so any on them display fine while any others are unable to connect.
[QUOTE=JohnWallace;45972593]The server port (e.g. 27015) also needs to be opened for UDP incoming otherwise the server status won't display (Error connecting). Functionally everything else works iirc just actually seeing if a server is online and who's playing doesn't.[/QUOTE] If the server doesn't have port 27015 accepting incoming UDP connections then what's the point in querying it? No one would be able to connect :v:
[QUOTE=Banana Lord.;45973223]If the server doesn't have port 27015 accepting incoming UDP connections then what's the point in querying it? No one would be able to connect :v:[/QUOTE] I don't think you get it. Port 27015 has to be opened on the webserver, not just the game server. That's the entire problem I suppose.
[QUOTE=Cyberuben;45973445]I don't think you get it. Port 27015 has to be opened on the webserver, not just the game server. That's the entire problem I suppose.[/QUOTE] Oh, I thought you meant that it needed to be opened on the gameserver, apologies.
I'm learning CSS/HTML right now, why do id attributes exist? It seems like id's are just classes which are only used once.
[QUOTE=FunnyBunny;45975613]I'm learning CSS/HTML right now, why do id attributes exist? It seems like id's are just classes which are only used once.[/QUOTE] The IDs are faster, as far as I know.But I think the difference in performance is low enough for it to not really matter as much. And there is this strange thing about IDs [url]http://jsfiddle.net/kfgynhwu/1/[/url] For whatever reason, this seems valid (it isn't really, and every validator tells me that I will die) :v:
[QUOTE=FunnyBunny;45975613]I'm learning CSS/HTML right now, why do id attributes exist? It seems like id's are just classes which are only used once.[/QUOTE] As far as I know, the rule of thumb is that IDs are only used on objects that exist once in your source. Classes are used in cases where you have the same type HTML repeated, in a list for example (<li>). You can use IDs to jump to a certain item on a page (i.e. [url]http://mywebsite.com/contact.php#call-us[/url] would jump to the location of the HTML element with ID "call-us").
[QUOTE=FunnyBunny;45975613]I'm learning CSS/HTML right now, why do id attributes exist? It seems like id's are just classes which are only used once.[/QUOTE] In pure CSS/HTML "id" attributes are pretty much just for jumps and one-off elements, like the other two guys said. If you're doing any Javascript or other dev work, ids become really important: it's much easier to find an element by id in the DOM tree than to hunt it down some other way. You would do that to grab info from a form or manipulate the contents of an element, for example.
How do I solve this? [t]https://dl.dropboxusercontent.com/u/965202/ShareX/2014-09/2014-09-15_22-48-38.png[/t] I've removed all the CSS from Facepunch and injected my own. Large images and long strands of code causes all contents of posts to stretch past the parent div's. I don't know how to restrict the contents to not do that.
Sorry, you need to Log In to post a reply to this thread.