Register a SA Forums Account here!
JOINING THE SA FORUMS WILL REMOVE THIS BIG AD, THE ANNOYING UNDERLINED ADS, AND STUPID INTERSTITIAL ADS!!!

You can: log in, read the tech support FAQ, or request your lost password. This dumb message (and those ads) will appear on every screen until you register! Get rid of this crap by registering your own SA Forums Account and joining roughly 150,000 Goons, for the one-time price of $9.95! We charge money because it costs us money per month for bills, and since we don't believe in showing ads to our users, we try to make the money back through forum registrations.
 
  • Post
  • Reply
Depressing Box
Jun 27, 2010

Half-price sideshow.

Xarthor posted:

For some reason this no longer works. I just updated my theme (Moesia) and when I went back to set my scripts.js to subtract the pixels nothing happens! I've tried subtracting more pixels, less pixels, etc. Nothing seems to change. The bar doesn't appear on the screen no matter how many pixels I remove. It worked fine in the past, even when I updated Moesia and then went back and updated the scripts.js.

Is there something new in WP that's preventing this from working? I'm totally confused. HALP

Here's your problem:



That height variable is calculated on page load and doesn't have anything subtracted from it. If you rewrite it as something like:
JavaScript code:
	var height = $(window).height() - 71;
It should work as expected.

Adbot
ADBOT LOVES YOU

fletcher
Jun 27, 2003

ken park is my favorite movie

Cybernetic Crumb

Thermopyle posted:

I always come to this point in projects and I either have to hire someone, or lightly customize something already existing.

I don't have the skrilla to hire somebody (especially for a venture I know will always be losing money, awfulyearbook). I thought about customizing something existing but I don't want it to look that official or professional. I want it to be more on the fun/silly side I guess.

DarkLotus
Sep 30, 2001

Lithium Hosting
Personal, Reseller & VPS Hosting
30-day no risk Free Trial &
90-days Money Back Guarantee!

fletcher posted:

I don't have the skrilla to hire somebody (especially for a venture I know will always be losing money, awfulyearbook). I thought about customizing something existing but I don't want it to look that official or professional. I want it to be more on the fun/silly side I guess.

Your best bet is to reach out to your existing user base and see if anyone has the skills necessary and the willingness to donate their time.

v1nce
Sep 19, 2004

Plant your brassicas in may and cover them in mulch.

fletcher posted:

I don't have the skrilla to hire somebody (especially for a venture I know will always be losing money, awfulyearbook). I thought about customizing something existing but I don't want it to look that official or professional. I want it to be more on the fun/silly side I guess.

Open source it (the design side, anyway) and ask for contributions / suggestions / designs / PRs?

karms
Jan 22, 2006

by Nyc_Tattoo
Yam Slacker
Usually I gather up a few sites that I like the look of and steal bits and pieces. It works out ok.

v1nce
Sep 19, 2004

Plant your brassicas in may and cover them in mulch.

Khelmar posted:

I'll be upfront and say we don't have a lot of analytics - this site was put together sometime in the late 90s - early 2000s, and not a lot has been done with it since.
Right, but do you have any? A months worth of visitor data? a week?
My point is about what content attracts your visitor, as well as what browsers your visitors use. If you're going to rebuild a website you want to engineer it towards the people who are using it. Who knows, you might have to cater towards IE8 like I do.

If you don't have any analytics, throw something (GA) on there and get at least a few days worth of data. If you don't have a shared head/foot (ew) then just chuck it into the homepage so you at least get an overview from there.

Khelmar posted:

we're all pathologists rather than web developers, which doesn't help.
To me this screams that you don't want to be rolling your own system, and ideally you can use something with good CMS capabilities, and something you can throw at any developer for cheap and get what you want, as well as letting joe-idiot contribute content in a safe manner.
What you go with depends on your expertise and what you're willing to learn along the way. What do you know? What would you be willing to learn?
To me, as a PHP developer, this says Wordpress.

Khelmar posted:

This group is the clearinghouse for a lot of information that's hard to impossible to find elsewhere, as well as training classes for the specialty. Since most folks are just stopping in to see what classes or seminars are available, sign up, buy books, or get the syllabi for classes, there's not a lot of retention or repeat business.
This sounds like:
- basic CMS pages
- contact form
- events listings
- gallery
- mailing list signup integration? (what does it do right now?)
- membership application? (just a form download?)

Your biggest problem is your store, if you're looking to rewrite. Either you have to find a way to re-skin it (unlikely painful experience) or you integrate a new store solution.
There's a lot of concerns here, like how do you handle payments right now, how would you need to handle payments in a new system, how many products do you have, do you export any data from the store, does it integrate with any systems on the back-end for easy dispatch/order notifications.

Khelmar posted:

I'm open to suggestions to raze it all and start over, although I don't know if the board will ultimately go for it. :)

Proof-of-concept that you can whip up quickly, then estimate on a finish (probably largely content population), would be key to making others agreeable.

fuf
Sep 12, 2004

haha
Why aren't my nginx rewrites working? :(

/etc/nginx/conf.d/wordpress.conf:

code:
location / {
    index index.html index.php;
    try_files $uri $uri/ /index.php?$args;

   # sitemap
    rewrite /sitemap\.xml$ /index.php?sitemap=1 permanent;
}
/etc/nginx/sites-enabled/website.com:
code:
server {
    server_name website.com;
    root /var/www/website.com;

    include conf.d/wordpress.conf;
}
website.com/index.php?sitemap=1:


website.com/sitemap.xml:


:(

Impotence
Nov 8, 2010
Lipstick Apathy
try rewrite ^/sitemap.xml$ /index.php?sitemap=1 last;

fuf
Sep 12, 2004

haha
It was this block:

code:
.
location ~* ^.+\.(xml|ogg|ogv|svg|svgz|eot|otf|woff|mp4|ttf|css|rss|atom|js|jpg|jpeg|gif|png|ico|zip|tgz|gz|rar|bz2|doc|xls|exe|ppt|tar|mid|midi|wav|bmp|rtf)$ {
    expires max;
}
Removing xml from set of matched extensions fixed the rewrite. But why would setting expiration headers give a 404? :confused:

Xarthor
Nov 11, 2003

Need Ink or Toner for
Your Printer?

Check out my
Thread in SA-Mart!



Lipstick Apathy

Depressing Box posted:

Here's your problem:



That height variable is calculated on page load and doesn't have anything subtracted from it. If you rewrite it as something like:
JavaScript code:
	var height = $(window).height() - 71;
It should work as expected.

Thank you! I appreciate the help.

Heskie
Aug 10, 2002

fuf posted:

It was this block:

code:
.
location ~* ^.+\.(xml|ogg|ogv|svg|svgz|eot|otf|woff|mp4|ttf|css|rss|atom|js|jpg|jpeg|gif|png|ico|zip|tgz|gz|rar|bz2|doc|xls|exe|ppt|tar|mid|midi|wav|bmp|rtf)$ {
    expires max;
}
Removing xml from set of matched extensions fixed the rewrite. But why would setting expiration headers give a 404? :confused:

I had the same issue with a .html rewrite, where nginx would match the file ending to my static file caching location block and never reach the rewrite.

Take a look at this stack overflow answer: http://stackoverflow.com/a/5238430

I believe nginx prioritises location blocks based on the selector. I think in your situation '/sitemap.xml' is matching your regex caching location block (location ~* ^.\.(....), and never actually bothering to look beyond it ('location /') to see the rewrite.

I can't remember the exact solution but maybe you could nest your regex static file location block inside your 'location /' block, or have a location block that matches sitemap.xml exactly (i.e. location = /sitemap.xml {})

fuf
Sep 12, 2004

haha

Heskie posted:

I had the same issue with a .html rewrite, where nginx would match the file ending to my static file caching location block and never reach the rewrite.

Take a look at this stack overflow answer: http://stackoverflow.com/a/5238430

I believe nginx prioritises location blocks based on the selector. I think in your situation '/sitemap.xml' is matching your regex caching location block (location ~* ^.\.(....), and never actually bothering to look beyond it ('location /') to see the rewrite.

I can't remember the exact solution but maybe you could nest your regex static file location block inside your 'location /' block, or have a location block that matches sitemap.xml exactly (i.e. location = /sitemap.xml {})

Oh nice, yeah you're right. It was matching the regex block and then stopping. That makes sense.

So one solution is just to move the rewrite rules into that block:
code:
    # cache headers
    location ~* ^.+\.(xml|ogg|ogv|svg|svgz|eot|otf|woff|mp4|ttf|css|rss|atom|js|jpg|jpeg|gif|png|ico|bmp|rtf)$ {
        expires max;
        # sitemaps
        rewrite /sitemap\.xml$ /index.php?sitemap=1 last;
        rewrite /([a-z]+)?-?sitemap\.xsl$ /index.php?xsl=$1 last;
        rewrite /sitemap_index\.xml$ /index.php?sitemap=1 last;
        rewrite /([^/]+?)-sitemap([0-9]+)?\.xml$ /index.php?sitemap=$1&sitemap_n=$2 last;
    }
This works but it's not very elegant.

Nesting the regex block inside "location /" makes more sense, but I'm missing something because this doesn't work for some reason:

code:
location / {
    index index.html index.php;
    try_files $uri $uri/ /index.php?$args;

    # sitemaps
    rewrite /sitemap\.xml$ /index.php?sitemap=1 last;
    rewrite /([a-z]+)?-?sitemap\.xsl$ /index.php?xsl=$1 last;
    rewrite /sitemap_index\.xml$ /index.php?sitemap=1 last;
    rewrite /([^/]+?)-sitemap([0-9]+)?\.xml$ /index.php?sitemap=$1&sitemap_n=$2 last;

    # cache headers
    location ~* ^.+\.(xml|ogg|ogv|svg|svgz|eot|otf|woff|mp4|ttf|css|rss|atom|js|jpg|jpeg|gif|png|ico|zip|wav|bmp|rtf)$ {
        expires max;
    }
}
I figured the nested regex block would inherit the rewrite rules from the parent block, but I get a 404 again instead?

e: ok I followed your second suggestion instead and specified a location block specifically for sitemaps:
code:
location ~* ([^/]*)sitemap(.*)\.x(m|s)l$ {
    rewrite ^/sitemap\.xml$ /sitemap_index.xml permanent;
    rewrite ^/([a-z]+)?-?sitemap\.xsl$ /index.php?xsl=$1 last;
    rewrite ^/sitemap_index\.xml$ /index.php?sitemap=1 last;
    rewrite ^/([^/]+?)-sitemap([0-9]+)?\.xml$ /index.php?sitemap=$1&sitemap_n=$2 last;
}
This one takes priority over the caching block so I'm all good.

fuf fucked around with this message at 12:28 on Oct 1, 2015

revmoo
May 25, 2006

#basta
So my company is insisting on switching from Git to SVN and we're having a meeting to discuss the pros and cons (lol)

Does anyone have a list of big companies using Git that I can show these guys? They think Git is some fad or something.

Impotence
Nov 8, 2010
Lipstick Apathy
https://enterprise.github.com/case-studies could help a bit?

revmoo
May 25, 2006

#basta
Mostly looking for Git-specific stuff but I'll go with the Github stuff if I can't find anything else.

This is such a horrible argument to even be having, it's like the company wants to go from Windows NT to Dos or something. :suicide:

It's even worse because I migrated the entire company over from SVN->Git last year. We've just got a new division that's a bunch of Windows guys that are afraid of change.

Thermopyle
Jul 1, 2003

...the stupid are cocksure while the intelligent are full of doubt. —Bertrand Russell

revmoo posted:

So my company is insisting on switching from Git to SVN and we're having a meeting to discuss the pros and cons (lol)

Does anyone have a list of big companies using Git that I can show these guys? They think Git is some fad or something.

I got a good laugh out of this.

You might get more responses in the general programming thread or the version control thread.

Data Graham
Dec 28, 2009

📈📊🍪😋



What's the primary benefit of git in sound-bite form? That commits are ad-hoc and distributed so you don't have to be ready to merge to trunk with every checkin?

My nemesis won't stand for git because it's commie GPL slime.

Thermopyle
Jul 1, 2003

...the stupid are cocksure while the intelligent are full of doubt. —Bertrand Russell

If I was to name one thing it would super fast and easy branching and merging.

Which is kind of two things.

fletcher
Jun 27, 2003

ken park is my favorite movie

Cybernetic Crumb

revmoo posted:

Mostly looking for Git-specific stuff but I'll go with the Github stuff if I can't find anything else.

This is such a horrible argument to even be having, it's like the company wants to go from Windows NT to Dos or something. :suicide:

It's even worse because I migrated the entire company over from SVN->Git last year. We've just got a new division that's a bunch of Windows guys that are afraid of change.

Holy poo poo man :(

I'd just be looking for a new job at that point

My org switched from SVN to git about 4 years ago. I could never go back to SVN. Git is just such a integral part of my everyday workflow. rebase, squash, reordering commits, feature branches, staging, stashing, rewriting history on my private branches. It just shits on SVN in every way possible.

bartkusa
Sep 25, 2005

Air, Fire, Earth, Hope

fletcher posted:

My org switched from SVN to git about 4 years ago. I could never go back to SVN.

Use this. "Subversion is a recruiting hazard. Many good devs like Git, and they won't want to work here."

Lumpy
Apr 26, 2002

La! La! La! Laaaa!



College Slice

revmoo posted:

Mostly looking for Git-specific stuff but I'll go with the Github stuff if I can't find anything else.

This is such a horrible argument to even be having, it's like the company wants to go from Windows NT to Dos or something. :suicide:

It's even worse because I migrated the entire company over from SVN->Git last year. We've just got a new division that's a bunch of Windows guys that are afraid of change.

Obviously this is tongue in cheek, but:

Here's who uses git: Every successful company that we want to be like.

Here's who uses SVN: Dinosaur companies that are afraid of change.

Here's who switched back to SVN from git:

Skandranon
Sep 6, 2008
fucking stupid, dont listen to me

revmoo posted:

Mostly looking for Git-specific stuff but I'll go with the Github stuff if I can't find anything else.

This is such a horrible argument to even be having, it's like the company wants to go from Windows NT to Dos or something. :suicide:

It's even worse because I migrated the entire company over from SVN->Git last year. We've just got a new division that's a bunch of Windows guys that are afraid of change.

Maybe offer up Mercurial as a simpler version of Git? TortoiseHg does a really good job of providing a UI that does most of what your day to day stuff will be, but in a Windows friendly way.

Space Kablooey
May 6, 2009


revmoo posted:

So my company is insisting on switching from Git to SVN and we're having a meeting to discuss the pros and cons (lol)

Does anyone have a list of big companies using Git that I can show these guys? They think Git is some fad or something.

Tell them that Facebook uses it. Everyone loves whatever Facebook is doing/using, right?

Munkeymon
Aug 14, 2003

Motherfucker's got an
armor-piercing crowbar! Rigoddamndicu𝜆ous.



revmoo posted:

Mostly looking for Git-specific stuff but I'll go with the Github stuff if I can't find anything else.

This is such a horrible argument to even be having, it's like the company wants to go from Windows NT to Dos or something. :suicide:

It's even worse because I migrated the entire company over from SVN->Git last year. We've just got a new division that's a bunch of Windows guys that are afraid of change.

Point out to them that git support is baked right into Visual Studio these days? Visual Studio, like anything Microsoft makes, doesn't really shed features, so it's around to stay.

Lumpy
Apr 26, 2002

La! La! La! Laaaa!



College Slice

HardDisk posted:

Tell them that Facebook uses it. Everyone loves whatever Facebook is doing/using, right?

Doesn't Facebook use mercurial?

Munkeymon
Aug 14, 2003

Motherfucker's got an
armor-piercing crowbar! Rigoddamndicu𝜆ous.



https://code.facebook.com/posts/218678814984400/scaling-mercurial-at-facebook/ yeah

Space Kablooey
May 6, 2009


Dammit.

Munkeymon
Aug 14, 2003

Motherfucker's got an
armor-piercing crowbar! Rigoddamndicu𝜆ous.



Google, too, last I heard

revmoo
May 25, 2006

#basta
I know right? I find Hg pretty icky even though it's probably a fine VCS. I'm always surprised at the amount of orgs using it. I probably wouldn't put up as much fight if it was Git->Hg (other than it's a huge stupid waste of time), but Git->SVN is something I'm liable to quit over. It's really annoying too because I just turned down a nearly identical job that pays 30k MORE than I'm making right now and I'm feeling like a dumbass at the moment.

I put together this awesome setup over the last year with Git, Bamboo CI, Jira, Hipchat, etc etc. All LDAPed together and nicely and fully integrated and it's all being ripped apart piece by piece.

substitute
Aug 30, 2003

you for my mum
Concerning source control at Google and Facebook:

http://www.wired.com/2015/09/google-2-billion-lines-codeand-one-place/

... Google has built its own “version control system” for juggling all this code. The system is called Piper, and it runs across the vast online infrastructure Google has built to run all its online services. ...

... The two internet giants are working on an open source version control system that anyone can use to juggle code on a massive scale. It’s based on an existing system called Mercurial. ...

Skandranon
Sep 6, 2008
fucking stupid, dont listen to me
There is a TortoiseGit UI, have you tried to get the Windows users to use that?

Heskie
Aug 10, 2002

Skandranon posted:

There is a TortoiseGit UI, have you tried to get the Windows users to use that?

SourceTree and SmartGIT are good options too.

kedo
Nov 27, 2007

Heskie posted:

SourceTree

Seconding this. SourceTree is a pretty sweet program.

fletcher
Jun 27, 2003

ken park is my favorite movie

Cybernetic Crumb

kedo posted:

Seconding this. SourceTree is a pretty sweet program.

Ehhh, I can't stand SourceTree. It makes things so complicated. Between git (CLI), gitk, and git gui you can do everything so easily.

revmoo
May 25, 2006

#basta
Its funny, ive never tried a Git gui ever. Ive used gui tools for merge conflicts, but never an actual Git program (or cvs/svn). Ive always used, and trusted the CLI. I use a bunch of hotkeys to automate my Git workflow. Using a mouse seems so clunky.

I mean, ive seen them in use plenty of times, but never felt the need.

Skandranon
Sep 6, 2008
fucking stupid, dont listen to me

revmoo posted:

Its funny, ive never tried a Git gui ever. Ive used gui tools for merge conflicts, but never an actual Git program (or cvs/svn). Ive always used, and trusted the CLI. I use a bunch of hotkeys to automate my Git workflow. Using a mouse seems so clunky.

I mean, ive seen them in use plenty of times, but never felt the need.

You may not, but if you are getting resistance from Windows users who don't like change, this may be a way to convince them it's not so bad. You can't win these fights just by proving how dumb they are for wanting to use SVN, you just make yourself look like a jerk.

Blinkz0rz
May 27, 2001

MY CONTEMPT FOR MY OWN EMPLOYEES IS ONLY MATCHED BY MY LOVE FOR TOM BRADY'S SWEATY MAGA BALLS
90% of the stuff you might want to do with Git can be done really easily with SourceTree. It's gotten to the point where I've almost completely adopted it just because it speeds up my workflow. All of my non-technical colleagues use it as well and it's worked out for them. Highly recommended.

substitute
Aug 30, 2003

you for my mum
SourceTree is my project command center.

McGlockenshire
Dec 16, 2005

GOLLOCKS!

revmoo posted:

I find Hg pretty icky even though it's probably a fine VCS.

You might want to find out why the Windows team hates git so much. Chances are that they don't like the syntax. Git is a bizarre and unexpected creature when coming from svn and if you've never used distributed source control before. Mercurial uses normal, human terms for things and is comfortable and familiar for people used to svn, and it does pretty much all the same things git does in very similar ways. Mercurial also has traditionally had way better Windows support. Git has won the popularity war, but Mercurial is still a perfectly fine solution.

It's also quite possible that their team workflow just doesn't benefit from distributed version control. I know my team's workflow certainly doesn't.

McGlockenshire fucked around with this message at 09:41 on Oct 2, 2015

Adbot
ADBOT LOVES YOU

revmoo
May 25, 2006

#basta
I think they're just afraid of change tbh. I've trained 7-8 developers over the years on Git and I've never once had someone that struggled to pick Git up. I've written up a pretty nice little cheat sheet that makes it easy. Hell, I've trained designers and marketing heads on Git and never seen anyone have issues.

I mean:

svn commit => git add *; git commit; git push

svn diff => git diff

svn update => git pull

etc etc. Not exactly rocket science. Hell, svn branching is more complicated than Git imho. Plus the flexibility you get with Git's working tree makes your life a lot easier than the SVN model for nearly all situations.

Fortunately the other devs on my team (who learned Git in like 20 minutes last year haha) are in my corner so I'm not going it alone.

  • 1
  • 2
  • 3
  • 4
  • 5
  • Post
  • Reply