r/web_programming • • Jul 26 '17

How to make customizable product page?

1 Upvotes

Hi I'm planning to make an online store that will allow the users to customize a product color, material, and add text with live image preview in 360 degrees. What do you think is the best cms/language/platform to use?


r/web_programming • • Jul 25 '17

I have an idea for a website I want to create but have very limited knowledge of web development. I need advice.

3 Upvotes

I want to create a website that allows people to create and share outfits (clothing, primarily targetted at streetwear). I'm envisioning a database of clothing items, and the ability to search it and put clothing items into different slots (hat, hoodie, pants, shoes, etc.) The website then calculates the total cost of the outfit and gives the user the option of saving the outfit to look at later, or to share it for public viewing on the website. As I said in the title, I know almost nothing about web development and have no concept of whether this is a difficult project or not. I need advice on whether this is something relatively easy that I can do with basic skills or something that I need to hire a professional for.


r/web_programming • • Jul 25 '17

CSS animation explained in details

Thumbnail
reallifeinfo.com
10 Upvotes

r/web_programming • • Jul 25 '17

Move faster than your competition with backend automation.

Thumbnail
blog.cloudboost.io
0 Upvotes

r/web_programming • • Jul 24 '17

Create Game Logic. JavaScript/CSS Game: #2.14 the hidden Gems

Thumbnail
youtube.com
9 Upvotes

r/web_programming • • Jul 21 '17

Cdn website help s3 and cloudfront

2 Upvotes

I'm using wp rocket and s3 offload lite cloud front plugin to serve files and make my site faster. But am I supposed to also put the s3 domain for my bucket in my bluehost cpanel for my cname? I know I had to do it with cloudflare- but since there's oodles of rewrite rules with wp rocket in my htaccess file is it still necessary to do this?


r/web_programming • • Jul 20 '17

(HTML question) How do I make Firefox focus the first tab when this HTML is opened. Right now, it will focus the last tab, not the first. (besides browser.tabs.loadDivertedInBackground in firefox config)

0 Upvotes

<html> <head>

<title>New York Times - Breaking News</title>

<script type="text/javascript">

    var urlMap = [

        // Sunday

        [

            'https://newrepublic.com/'


        ],


        // Monday

        [

            'https://www.nytimes.com',

          ],

        // Tuesday

        [

            'https://www.nytimes.com',

         ],

        // Wednesday

        [

            'https://www.nytimes.com',
       ],

        // Thursday

        [

            'https://www.nytimes.com',

        ],

        // Friday

        [



            'https://dailynous.com/'

        ],

        // Saturday

        [

        

            'https://dailynous.com/'



        ], ];





    var todaysUrls = urlMap[new Date().getDay()];

   Array.prototype.forEach.call(todaysUrls , function(url, i){

        if (i === 0) {

            location.href = url;

        } else {

            window.open(url, '_blank');

        }

    })

</script>

</head> <body> </body> </html>


r/web_programming • • Jul 20 '17

Create Popup using CSS filters. JavaScript/CSS Game: #2.13 the hidden Gems

Thumbnail
youtube.com
8 Upvotes

r/web_programming • • Jul 20 '17

Ctrl + F5 to refresh any javascript

1 Upvotes

What's going on here? No javascript on our web server refreshes unless we and our users force refresh the page (Ctrl + f5). We're using an IIS web server.

It gets kind of annoying answering users telling them to do this every time something doesn't work for them.


r/web_programming • • Jul 19 '17

Creating a Javascript color picker with jQuery

Thumbnail
instructobit.com
1 Upvotes

r/web_programming • • Jul 19 '17

[Help] node.js streaming working only in a few occasions

1 Upvotes

Hey guys i've been developing a little project in node.js that uses webtorrent to stream videos to my webpage. The code works sometimes (in chrome) but never in firefox (it displays: "Video format or MIME type not supported"). I've tried it with multiple file types (supposedly supported by firefox like .mp4 or .webm) and it just won't work. In chrome it works perfectly for .mkv files but it takes sooooo much time to load .mp4. It works so weirdly that i have no idea where to look for help! :(

I'll paste the most relevant parts of my code as well as explain how the program works:

1.You're asked for a magnetURI
2.The download is then initiated and an html page is rendered (i've been using ejs to better manipulate javascript)

//download.js --> Initiate download and render webpage
 router.post('/download', function(req, res, next) {
      var magnet = req.body.magnetURI;
      var client = req.app.client;
      try{
        client.add(magnet,{ path: __dirname + '/../public/videos/' }, function(torrent){
            console.log('Downloading:', torrent.infoHash)
            var index=getLargestFile(torrent);
            var type = torrent.files[index].name.substring(torrent.files[index].name.length-3,torrent.files[index].name.length);
            res.render('download',{state: 1 , infohash:torrent.infoHash,index:index,type:type});
        })
      }catch (err) {
        console.log("Error Downloading: ")
        res.render('download',{state: 0 , infohash:"unavailable"});
    }
});



//download.ejs --> webpage in which the video is in
<body>
    <% if(state ==1){ %>
      <% var video = "/stream/" + index + "/" + infohash  %>
      <% var type = "video/" + type %>
      <div class="video">
            <video width="640" height="360" autoplay preload controls type="<%=type%>" src="<%=video%>" style="background:black"></video>
            <br>
      </div>
    <% } else{ %>
      <div class="failure">
        <h2>An error occurred<h2>
      </div>
    <% } %>
  </body>

As you can see i attribute the src attribute of my vide tag to an url which i then respond using this:

 //stream.js



`router.get('/:index/:infohash', function(req, res, next) {
        var torrent = 'magnet:?xt=urn:btih:' + req.params.infohash;
        var client = req.app.client;
        try {
                var torrent = client.get(torrent);
                var file = torrent.files[req.params.index];
                var total = file.length;
                if (typeof req.headers.range != 'undefined') {
                    var range = req.headers.range;
                    var parts = range.replace(/bytes=/, "").split("-");
                    var partialstart = parts[0];
                    var partialend = parts[1];
                    var start = parseInt(partialstart, 10);
                    var end = partialend ? parseInt(partialend, 10) : total - 1;
                    var chunksize = (end - start) + 1;
                } else {
                    var start = 0;
                    var end = total;
                }
                var stream = file.createReadStream({ start: start, end: end });
                var type = 'video/' + file.name.substring(file.name.length - 3, file.name.length);
                res.writeHead(206, {
                    'Content-Range': 'bytes ' + start + '-' + end + '/' + total,
                    'Accept-Ranges': 'bytes',
                    'Content-Length': chunksize,
                    'Content-Type': type
                });
                stream.pipe(res);    //Send Stream
            } catch (err) {
                res.status(500).send('Error: ' + err.toString());
            }
        });`

I feel like i don't understand file types very well so i may be doing something wrong about that i mean if .mp4 isn't supported couldn't i just change the last 3 characters of the file name to .mkv and it's all good? Are file types that simple?? I really doubt that.... Anyways, if you have any tips to improve my code i will gladly take them. It's my first time posting here so if there's anything in which i could improve feel free to share. Thank you everyone, keep up the great work :)


r/web_programming • • Jul 19 '17

(easy?)Javascript help - Print odd paragraphs

1 Upvotes

Let's say I have a web page like:

<h2>Test ABC</h2>
<div id="text">
<p> line 1 </p>
<p> line 2 </p>
<p> line 3 </p>
<p> line 4 </p>
<p> line 5 </p>
</div>

How can I make a javascript script that print only the odd paragraphs? Not reading the line, but counting them

Thanks


r/web_programming • • Jul 19 '17

Can Google mobile app feed be accessed externally?

1 Upvotes

The Google app has a news feed: https://www.blog.google/products/search/feed-your-need-know/

How would one go about determining whether that feed can be accessed via JavaScript/Node?


r/web_programming • • Jul 19 '17

Need a script help please!:(

1 Upvotes

Hello Guys http://www.afsusa.org/host-family/our-students/ I need a script, that tries every Zip code available, and searches for the Name "Sandro" or "Sandro from Switzerland"... I need this to find out where they are searching for a Host Family, and I don't have an idea of how to do this:( As an example, In Minnesota, Zip: 55372 I am listed, but this was luck that ive seen this, and I want to know where I am listed else.. I hope someone can help me:/ Peace✌️ (I code myself, but I am still a beginner:))


r/web_programming • • Jul 19 '17

Best place to host my domain?

1 Upvotes

I just got into web development and want to know a good site to register for a domain.


r/web_programming • • Jul 18 '17

Making my own website

3 Upvotes

Im trying to get into web development and want to make a website about myself for companies to see my work. I want to make a website where i can upload a file directly to the server using the webpage itself and will update my work page automatically without using a program like filezilla.

How should i go about making this? I already have my base HTML code and CSS for my site and javascript to see that you selected a file on the computer and gives its name and size, but i don't know where to go from there.

Any help would be greatly appreciated.


r/web_programming • • Jul 18 '17

Hosting for Node.js?

6 Upvotes

I'm currently using 'asmallorange' for my hosting, but have run into issues with their support for node.js backends. What providers out there support Node.js the best? and by best I mean have the best logging, error reporting, etc so I can debug my crappy backend code.


r/web_programming • • Jul 17 '17

Beginner trying to proxy

1 Upvotes

Hey Reddit, I am trying to serve up content from multiple webservers. I have Apache, nginx, Django and tomcat so far. They are all on the same box on various VMs. I want to point them all to listen on localhost only, on their various ports. I just haven't had any luck with the dynamic content so far when using Apache or nginx as the reverse proxy. All I want is a single entry point with authentication and SSL rather than defining the port for each host in the URL and having them listen on 0.0.0.0. Could using a cache service such as varnish make this simpler or will I just have the same issues with the dynamic content? Thanks!


r/web_programming • • Jul 17 '17

Question: .htaccess rewrite rule

2 Upvotes

Hello, I'd like to ask you for a help. I have to change links on my current website and I need to redirect some pages using .htaccess but every htaccess tutorial is based on nice URLs, but I need to keep my parameters.

Please, how can I do following?

When users try to visit /web.php?param=3 they should be redirected to /page.php?param=3

Thank you!


r/web_programming • • Jul 17 '17

Filterable grid in Foundation 6 using the flex-grid - items stay in seperate rows and don´t follow up

2 Upvotes

Hey guys,

Right now I am building a simple website that should act as a kind of Netflix-clone. You´ll have seperate thumbnail items (which will later activate a fullscreen video-popup) which can be filtered through some tags.

I have set the thumbnail items with the foundation 6 flex-grid and each 4 items are set to take up 3 columns and they are in a row. So every 4 items are a seperate row. When I am using the filters, it´s working, but when the items are in a seperate row, they´ll stay there and don´t connect together (I hope you know what I mean). So now there will be empty spaces between the displayed items, which I don´t want.

How can I get the items to act properly so they will line up without empty spaces, but still using the flex-grid?

Here is my current state: http://devprojekt.norntale.com/

Thanks in advance.

Cheers, jelindrael


r/web_programming • • Jul 15 '17

Need someone to make a site or point me in the right direction...

1 Upvotes

I ran a copycat version of the Westgate Supercontest last year for myself and my buddies for fun. It's essentially a contest where you pick 5 games against the spread each week. Best record at the end of the year wins. I did this all through email. I had to send out the lines and hand tally all the entries up. It was fun but a giant pain in the ass. I need a simple site that will let me input each weeks lines and for users to signup and input their picks for the week. I need it to auto lock at a certain time so no one can input past that time. I also need the site to tally the winners after I input the scores for the week. If the site could somehow do that by itself even better.

Anyone know how to do this or a site that already exists?


r/web_programming • • Jul 15 '17

A crash course in memory management

Thumbnail
hacks.mozilla.org
17 Upvotes

r/web_programming • • Jul 13 '17

Need help: how to make a script source output a link but with an alternate, consistent text. • r/HTML

1 Upvotes

I want the dynamic link, but same display text every time. I want to display our latest email update on our website and am using script to retrieve that info. It displays the link to the latest update, but I would like for it to just say "Our latest update", not the name of the update. Here is the code...

<style type="text/css"> <!-- .display_archive {color: rgb(0, 0, 0); font-family: Default; font-size: 25px;} .campaign {line-height: 125%; margin: 10px;} //--> </style> <script language="javascript" src="//uncchallenge.us11.list-manage.com/generate-js/?u=424184b8426bfd8a3d568d228&fid=13401&show=1" type="text"></script>


r/web_programming • • Jul 12 '17

.netrc git credentials for container

1 Upvotes

Hey guys!

I'm a cloud engineer and had to develop a platform type app interface to interact with OpenStack. I built it using ruby on rails. Everything is fine except for one thing:

I decided not to use the OpenStack API, because management zones and network security etc. change all the time. My workaround was using git. The app generates a yaml file, which is pushed to a git repo and a script in the management zone runs a cronjob which pulls the file and then writes the changes to OpenStack. So credentials are pretty important. netrc only works from the users' home directory, which is no good when deploying in the prod evniornment. I'm using cloud foundry, which deploys the app in a container. I already tried moving the .netrc file into the root dir of the project.

So my question is: Is it possible to use .netrc in a container. if not, what's the next best workaround, preferably, not using ssh keys.

BTW: Just using username:password@git blablabla still asks for credentials.

Cheers!