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
whose tuggin
Nov 6, 2009

by Hand Knit
Thanks, you have already been pretty helpful and I appreciate it. :cheers:

this is the mix file, mix.exs:

code:
defmodule PastePalooza.Mixfile do
  use Mix.Project

  def project do
    [
      app: :pastepalooza,
      version: "0.1.0",
      elixir: "~> 1.5",
      start_permanent: Mix.env == :prod,
      deps: deps(),
      flag: "REDACTED"
    ]
  end

  # Run "mix help compile.app" to learn about applications.
  def application do
    [
      extra_applications: [:logger],
      mod: {Server, []}
    ]
  end

  # Run "mix help deps" to learn about dependencies.
  defp deps do
    [
      # {:dep_from_hexpm, "~> 0.3.0"},
      # {:dep_from_git, git: "https://github.com/elixir-lang/my_dep.git", tag: "0.1.0"},
    ]
  end
end
as you can see, there is a field in the Project function called ":flag" with a value that's "REDACTED" in the source code that we have access to. But remember, this code is a simple server that's running remotely. If I can find out what the actual value of that "flag" field, I can complete the challenge.

Thus far, (with some help from the stackexchange you posted, and from elsewhere), I have figured out how to compile this server (along with some other source files that I didn't include) by running
code:
elixir --sname server -S mix run --no-halt
. Then I can run it, and even attach an instance of the iex interpreter/console to it by calling
code:
iex --sname console --remsh server@<TheScientist>
and then, from the iex remote shell that that spawns, invoking:
code:
Mix.Project.config[:flag]
echos the expected contents of that "key-pair" (if I'm understanding this correctly) - ie "REDACTED"


So now I'm working on getting the line in your first code snippet to work. I have no idea what the cookie or node names are. I will try various permutations of "paste palooza". Thanks, and I will try not to pollute this thread much more

Adbot
ADBOT LOVES YOU

RobertKerans
Aug 25, 2006

There is a heppy lend
Fur, fur aw-a-a-ay.

The Scientist posted:

So now I'm working on getting the line in your first code snippet to work. I have no idea what the cookie or node names are. I will try various permutations of "paste palooza". Thanks, and I will try not to pollute this thread much more

Yeah, you're completely on the right track here - the issue you're going to have is that when the server is on another computer, you need to know what the name/address of the application is. The cookie is a security measure, if you're meshing two applications on separate machines, you want them to share that (so for example if you start up the server on one machine with elixir --sname server --cookie monster -S mix run --no-halt), then on another machine you'd pass "monster" as the cookie, and then server@whatever_the_process_id_is as the name of the node you're connecting to. What you're literally connecting to here is the main application process (defined in the module Pasteapalooza) of the server (cf app: :pastepalooza in the keyword list in the project function).

Normally the server would be built with functionality to expose ways to mesh into a network, and have functions that would give you the information you want by sending messages to and from that node, so all this is a bit hacky.

The Scientist posted:

as you can see, there is a field in the Project function called ":flag" with a value that's "REDACTED" in the source code that we have access to. But remember, this code is a simple server that's running remotely. If I can find out what the actual value of that "flag" field, I can complete the challenge.

Yup, that's the easiest way to get the values - there isn't any magic, unless a function is defined as private, it'll be exposed and accessible.

Just on syntax here if it seems a bit weird: you can't just have a bare property in a module, everything has to be a function. In this case the function just returns a keyword list ([key1: value1, key2: value2], which is sugar for a list of k/v tuples, used generally for describing named options - same as [{:key1, value1}, {:key2, value2}]. So the function Mix.Project.config() evaluates to that list, and you can then access the values with the bracket syntax.

RobertKerans fucked around with this message at 11:23 on Mar 22, 2018

PT6A
Jan 5, 2006

Public school teachers are callous dictators who won't lift a finger to stop children from peeing in my plane
Is there a good way to explain to people that, sometimes, it's just not possible to crack the top 10 in a google search without spending money on advertising? I have a client in a fairly competitive business, and I feel that there's just a limit to what I can possibly do to get him a good spot on Google without advertising and/or a massive increase to the content creation budget.

He's definitely top-10 for certain brands that he carries, but generic terms are getting a mid-second-page result and there's just gently caress all I can think to do about it at this point. We've tried advertising on google and facebook, and it is at least driving traffic to the website if not the actual physical location, but he doesn't think it's worth it.

I don't know how else I can explain to him that all the other businesses in his industry are doing roughly the same things (but with a much bigger budget and customer base), and no one "deserves" a top 10 position just because they'd like more customers.

kedo
Nov 27, 2007

My argument to clients in situations like this is that a large part of your Google rank is based on other sites linking to you. The ways to get more links is to get more people talking about your business, and you can do that by investing in a marketing budget and/or producing more content yourself. If you've already done basic code optimization and are monitoring traffic patterns and responding with adword buys, everything else SEO is somewhere between snake oil and contraband that runs the risk of getting your site blacklisted. Most legit SEO firms I've worked with in the past are basically doing ad sales and analytics work.

Doesn't hurt to know of a good marketing person/firm you'd refer before you do this.

Nolgthorn
Jan 30, 2001

The pendulum of the mind alternates between sense and nonsense
I'm running the job application gauntlet and I've been noticing a significant number of companies are hiring for Python backends, and JS frontends. Very few seem to be looking for Node backends. Which is too bad because that's where I focused.

I have a lot of Ruby experience, I think it's clear Ruby lost to Python.

Capri Sun Tzu
Oct 24, 2017

by Reene
Organic SEO is great but you absolutely need to be doing paid search too if you want real traffic.

PT6A
Jan 5, 2006

Public school teachers are callous dictators who won't lift a finger to stop children from peeing in my plane

Capri Sun Tzu posted:

Organic SEO is great but you absolutely need to be doing paid search too if you want real traffic.

Yeah, I know, I've told him but he just won't listen because he doesn't want to spend money. Also, coincidentally, the same reason that we can't really do much more for organic SEO.

He keeps talking about wanting to be "more creative" in finding ways to market and I'm just thinking, "gently caress, I'm not a goddamn wizard, I can't conjure customers out of thin air for you for free."

Love Stole the Day
Nov 4, 2012
Please give me free quality professional advice so I can be a baby about it and insult you

Capri Sun Tzu posted:

Organic SEO is great but you absolutely need to be doing paid search too if you want real traffic.

Listening to the Indiehackers podcast, I hear mixed opinions from their success stories. I feel like the opinions expressed are either "paid advertising and whatnot was a complete waste of money for us" or "eh, it was alright, I guess."

Thermopyle
Jul 1, 2003

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

Love Stole the Day posted:

Listening to the Indiehackers podcast, I hear mixed opinions from their success stories. I feel like the opinions expressed are either "paid advertising and whatnot was a complete waste of money for us" or "eh, it was alright, I guess."

Thats because advertising is hard.

The Dave
Sep 9, 2003

PT6A posted:

Is there a good way to explain to people that, sometimes, it's just not possible to crack the top 10 in a google search without spending money on advertising? I have a client in a fairly competitive business, and I feel that there's just a limit to what I can possibly do to get him a good spot on Google without advertising and/or a massive increase to the content creation budget.

He's definitely top-10 for certain brands that he carries, but generic terms are getting a mid-second-page result and there's just gently caress all I can think to do about it at this point. We've tried advertising on google and facebook, and it is at least driving traffic to the website if not the actual physical location, but he doesn't think it's worth it.

I don't know how else I can explain to him that all the other businesses in his industry are doing roughly the same things (but with a much bigger budget and customer base), and no one "deserves" a top 10 position just because they'd like more customers.

Is he atleast going crazy with analytics / competitor analysis?

If you actually compile all the ads/keywords you can show that the competitors are paying for then you might have a better argument for "You need to do what they're doing, here are screens of exactly what they are doing."

Thermopyle
Jul 1, 2003

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

On the subject, what is some good reading on the technical side of how to do advertising? Finding good keywords, etc.

I never know what to point people towards...

teen phone cutie
Jun 18, 2012

last year i rewrote something awful from scratch because i hate myself

PT6A posted:

Yeah, I know, I've told him but he just won't listen because he doesn't want to spend money. Also, coincidentally, the same reason that we can't really do much more for organic SEO.

He keeps talking about wanting to be "more creative" in finding ways to market and I'm just thinking, "gently caress, I'm not a goddamn wizard, I can't conjure customers out of thin air for you for free."

Cheap clients are never worth working with

I recommend you :sever:

Nolgthorn posted:

I'm running the job application gauntlet and I've been noticing a significant number of companies are hiring for Python backends, and JS frontends. Very few seem to be looking for Node backends. Which is too bad because that's where I focused.

I have a lot of Ruby experience, I think it's clear Ruby lost to Python.

I've been wanting to becoming more of a full stack developer for months and have been crippled by the fact that there are way too many options.

But after looking at hundreds of job posts, it really does seem that Python is the server language to learn. Which is odd because I really thought Node was going to be the new hot thing.

teen phone cutie fucked around with this message at 17:23 on Mar 25, 2018

Thermopyle
Jul 1, 2003

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

melon cat
Jan 21, 2010

Nap Ghost
On the SEO talk- I'm going to vent a bit, here. Despite what anyone claims nobody has 100% "figured out" SEO (Google doesn't make this easy). It's constantly changing. But there are all of these "marketing and communications" companies out there that make dubious claims about "SEO optimization" and make bullshit claims about being able to make you #1 on Google Pagerank for the low, low cost of $800 a month or something. So people are just throwing money at these companies, many of which are run by complete hacks, with really mixed results.

PT6A
Jan 5, 2006

Public school teachers are callous dictators who won't lift a finger to stop children from peeing in my plane

melon cat posted:

On the SEO talk- I'm going to vent a bit, here. Despite what anyone claims nobody has 100% "figured out" SEO (Google doesn't make this easy). It's constantly changing. But there are all of these "marketing and communications" companies out there that make dubious claims about "SEO optimization" and make bullshit claims about being able to make you #1 on Google Pagerank for the low, low cost of $800 a month or something. So people are just throwing money at these companies, many of which are run by complete hacks, with really mixed results.

And depending on the role of the site, getting search results doesn't mean poo poo all for the clickthrough rate, and a good clickthrough rate does gently caress all to actually get customers to visit your business. That's the other thing that's frustrating to explain.

Even if you can get all the SEO metrics pumped, there's only so much that will actually accomplish for the business.

spiritual bypass
Feb 19, 2008

Grimey Drawer
Yeah I'm gonna need you to install this list of 10000 untested redirect rules and then pitch a fit when some of them don't work

Nolgthorn
Jan 30, 2001

The pendulum of the mind alternates between sense and nonsense

melon cat posted:

On the SEO talk- I'm going to vent a bit, here. Despite what anyone claims nobody has 100% "figured out" SEO (Google doesn't make this easy). It's constantly changing. But there are all of these "marketing and communications" companies out there that make dubious claims about "SEO optimization" and make bullshit claims about being able to make you #1 on Google Pagerank for the low, low cost of $800 a month or something. So people are just throwing money at these companies, many of which are run by complete hacks, with really mixed results.

It's modern snake oil. Google just does whatever it wants if you need a guaranteed page rank you have to pay Google money, that's on purpose.

LifeLynx
Feb 27, 2001

Dang so this is like looking over his shoulder in real-time
Grimey Drawer
I noticed the idea of a big slider on the homepage is dying very rapidly and I couldn't be happier.

The Merkinman
Apr 22, 2007

I sell only quality merkins. What is a merkin you ask? Why, it's a wig for your genitals!

LifeLynx posted:

I noticed the idea of a big slider on the homepage is dying very rapidly and I couldn't be happier.

You mean a carousel?

LifeLynx
Feb 27, 2001

Dang so this is like looking over his shoulder in real-time
Grimey Drawer

Yes, my resellers are obsessed with them. I'm going to pitch to the owner tomorrow that we should stop using them. They don't even have different CTAs on each slide, it's just "hey use these three stock images and/or badly taken iPhone photos behind a slogan".

Lumpy
Apr 26, 2002

La! La! La! Laaaa!



College Slice

TFW you know where that link is going before you hover over it. :smug:

LifeLynx
Feb 27, 2001

Dang so this is like looking over his shoulder in real-time
Grimey Drawer

Lumpy posted:

TFW you know where that link is going before you hover over it. :smug:

It's amazing. I'm going to show it to the owner of the main company I'm working with.

Speaking of moving away from bad trends I've stubbornly used out of familiarity, are there other sites like this on what not to do and reasons not to do it? I'm already planning on trying to use JavaScript instead of jQuery because of http://vanilla-js.com.

Edit: and http://youmightnotneedjquery.com

LifeLynx fucked around with this message at 01:34 on Mar 26, 2018

Nolgthorn
Jan 30, 2001

The pendulum of the mind alternates between sense and nonsense
http://www.youmightnotneedredux.info/

my bony fealty
Oct 1, 2008


Just do whatever Dan Abramov says, right?

(Not) controversial opinion: it's still a-ok to use jquery for bits of user interaction if you want to! But I guess one should know how to do it with JS.

kedo
Nov 27, 2007

my bony fealty posted:

Just do whatever Dan Abramov says, right?

(Not) controversial opinion: it's still a-ok to use jquery for bits of user interaction if you want to! But I guess one should know how to do it with JS.

In fact, if you need to support older browsers it's smart to use jQuery rather than vanilla JS. Being able to write things in plain old JS is a good skill to have, but don't throw out a perfectly valid and useful tool just because someone on the internet told you to.

Munkeymon
Aug 14, 2003

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



Grump posted:

I've been wanting to becoming more of a full stack developer for months and have been crippled by the fact that there are way too many options.

But after looking at hundreds of job posts, it really does seem that Python is the server language to learn. Which is odd because I really thought Node was going to be the new hot thing.

It's because there's no point in an application lifecycle at which Node is easier or better than either Flask or Django.

PT6A posted:

Is there a good way to explain to people that, sometimes, it's just not possible to crack the top 10 in a google search without spending money on advertising? I have a client in a fairly competitive business, and I feel that there's just a limit to what I can possibly do to get him a good spot on Google without advertising and/or a massive increase to the content creation budget.

He's definitely top-10 for certain brands that he carries, but generic terms are getting a mid-second-page result and there's just gently caress all I can think to do about it at this point. We've tried advertising on google and facebook, and it is at least driving traffic to the website if not the actual physical location, but he doesn't think it's worth it.

I don't know how else I can explain to him that all the other businesses in his industry are doing roughly the same things (but with a much bigger budget and customer base), and no one "deserves" a top 10 position just because they'd like more customers.

:allears: I've worked for these people. They're impossible to please.

Lumpy
Apr 26, 2002

La! La! La! Laaaa!



College Slice

my bony fealty posted:

Just do whatever Dan Abramov says, right?


Dan Abramov is much smarter than me, so when in doubt: yes.

ddiddles
Oct 21, 2008

Roses are red, violets are blue, I'm a schizophrenic and so am I
I just default to Redux because the hour or so setting it up and having access to connect() far outweighs passing props around the React way.

Unless your project is already started and you're trying to add Redux, then God help you.

Tei
Feb 19, 2011

Lumpy posted:

Dan Abramov is much smarter than me, so when in doubt: yes.

Yea, follow is footsteps*, except if he tries to cross a river swimming and you don't know how to swim. You Are Not Dan Abramov.

* Never heard of this dude before

Tei fucked around with this message at 16:18 on Mar 26, 2018

teen phone cutie
Jun 18, 2012

last year i rewrote something awful from scratch because i hate myself

ddiddles posted:

I just default to Redux because the hour or so setting it up and having access to connect() far outweighs passing props around the React way.

This is how projects end up with unnecessary bloat...

Munkeymon posted:

It's because there's no point in an application lifecycle at which Node is easier or better than either Flask or Django.

Speaking of which, what are some good resources in learning Python and how much does Flask and Django hide under a layer of magic?

teen phone cutie fucked around with this message at 17:27 on Mar 26, 2018

Lumpy
Apr 26, 2002

La! La! La! Laaaa!



College Slice

Grump posted:

This is how projects end up with unnecessary bloat...


Speaking of which, what are some good resources in learning Python and how much does Flask and Django hide under a layer of magic?

Flask, not much. Django, a bunch, but Django is a much more "batteries included" framework. The official Django tutorial is a good read (you don't have to actually follow along or even know python much) to see what it's all about.

Basically, Flask is React: it makes views easy, but you figure out all the other crap. Django is like uh.. Ember maybe? You do things it's way.

Munkeymon
Aug 14, 2003

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



Probably counterintuitive coming from JS-land but Python has good documentation https://wiki.python.org/moin/BeginnersGuide

Thermopyle
Jul 1, 2003

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

A good resource for learning Python is the Python thread. We're all very helpful over there :D.

Also, what Lumpy said about Django vs Flask is right. But there's a wrinkle. Django can be unopinionated, its just that people tend to use Django because it can do out of the box what you've got to glom a bunch of libraries together to do in Flask.

Here's a complete Django project for serving a Hello World page (actually from an older version but the idea is the same on Django 2.0):

Python code:
import sys


from django.conf import settings


settings.configure(
    DEBUG=True,
    SECRET_KEY='thisisthesecretkey',
    ROOT_URLCONF=__name__,
    MIDDLEWARE_CLASSES=(
        'django.middleware.common.CommonMiddleware',
        'django.middleware.csrf.CsrfViewMiddleware',
        'django.middleware.clickjacking.XFrameOptionsMiddleware',
    ),
)


from django.conf.urls import url
from django.http import HttpResponse


def index(request):
    return HttpResponse('Hello World')


urlpatterns = (
    url(r'^$', index),
)


if __name__ == "__main__":
    from django.core.management import execute_from_command_line

    execute_from_command_line(sys.argv)

ufarn
May 30, 2009
Man, I just remembered the Django guide ("book") and got sad. A guide so well written is such a rare sight.

Main Paineframe
Oct 27, 2010

my bony fealty posted:

Just do whatever Dan Abramov says, right?

(Not) controversial opinion: it's still a-ok to use jquery for bits of user interaction if you want to! But I guess one should know how to do it with JS.

There's not really much reason to use jQuery at this point, unless you still need to support IE8 or something. At this point, the jQuery way of accomplishing most tasks usually isn't much easier or better than the vanilla JS way of doing the same things, and jQuery's starting to show its age in ways that add just a bit of extra clunkiness.

darthbob88
Oct 13, 2011

YOSPOS
AngularJS question: Is there any reason I wouldn't be able to use Angular expressions inside another directive? I'm trying to create a carousel using this plugin and this config. It'll print item.logo and item.title just fine, and outputs {"foo":"bar", "baz": "qux"} for item.pages, but the ng-repeat just prints nothing. I can't find any good explanation anywhere else.
code:
  <ui-carousel slides="siteConfig.menu" slides-to-show="6" slides-to-scroll="4" initial-slide="1" class="ui-carousel">
                            <carousel-item>
                                <img ng-src="{{item.logo }}" alt="{{item.title}}">
                                {{item.pages}}
                                   <a class="sql-menu-item"
                                       href="{{page}}"
                                       target="_self" ng-repeat="name in item.pages">
                                        {{name}}
                                    </a>
				</carousel-item>
                        </ui-carousel>
E: Apparently this is a known issue with transcluding ng-repeat. Might be able to use this to push back again and get us using something other than AngularJS.

darthbob88 fucked around with this message at 23:56 on Mar 27, 2018

Love Stole the Day
Nov 4, 2012
Please give me free quality professional advice so I can be a baby about it and insult you

Hello, I am still trash but I've since implemented almost all of the suggestions you guys gave to make my portfolio project be less pathetic. Please tell me why it is still not good enough to get an interview with tia: https://wanderrful.github.io/korean-learning-app/

Things I did since last time I posted:
  • Created a separate back-end Express server on Heroku that serves a PostgreSQL DB table with data for the front-end linked above
  • Removed the ugly checkmark and replaced it with a Bootstrap thing that looks marginally less dumb
  • Added a "wrong guesses" list that shows your previous 3 attempts
  • Added a popover hint message for the current problem if you make more than 2 wrong guesses
  • Added alternate answers so that synonyms can also work
  • Added more words to the database so that there's 6 things now

Answers to each prompt to help you get through it quickly:
  • secret
  • pencil
  • chicken OR chicken meat OR poultry
  • hug OR to hug OR embrace OR to embrace
  • unemployed
  • indecision OR indecisiveness

Lumpy
Apr 26, 2002

La! La! La! Laaaa!



College Slice

Love Stole the Day posted:

Hello, I am still trash but I've since implemented almost all of the suggestions you guys gave to make my portfolio project be less pathetic. Please tell me why it is still not good enough to get an interview with tia: https://wanderrful.github.io/korean-learning-app/

Things I did since last time I posted:
  • Created a separate back-end Express server on Heroku that serves a PostgreSQL DB table with data for the front-end linked above
  • Removed the ugly checkmark and replaced it with a Bootstrap thing that looks marginally less dumb
  • Added a "wrong guesses" list that shows your previous 3 attempts
  • Added a popover hint message for the current problem if you make more than 2 wrong guesses
  • Added alternate answers so that synonyms can also work
  • Added more words to the database so that there's 6 things now

Answers to each prompt to help you get through it quickly:
  • secret
  • pencil
  • chicken OR chicken meat OR poultry
  • hug OR to hug OR embrace OR to embrace
  • unemployed
  • indecision OR indecisiveness

Change the title of the page to something besides 'React App'

Add in small text under the field "type your suggestion, then hit Enter" that goes away after the first time they do that.

Other than that, looks like a decent "My First React" project. More important would be to let us see the source for some hot hot code review action.

EDIT: link the source in the app!

Lumpy fucked around with this message at 15:55 on Mar 28, 2018

stoops
Jun 11, 2001
I use bootstrap alot but I still don't know how some things work,.

I have a standard bootstrap page: one container, with one row with 2 columns. I want the columns to fill up the whole page 100% height. I thought I could do that using bootstrap sizing, but it's relative to the parent.

How do I make it take up the whole page?

Any help is appreciated.

My code is below, or you could just click my page

code:
<div class="container-fluid">
	<div class="row">
		<div class="col-sm-8">
			<div style="height: 100px; background-color: rgba(255,0,0,0.1);">
				<div class="h-25 d-inline-block" style="width: 120px; background-color: rgba(0,0,255,.1)">Height 25%</div>
				<div class="h-50 d-inline-block" style="width: 120px; background-color: rgba(0,0,255,.1)">Height 50%</div>
				<div class="h-75 d-inline-block" style="width: 120px; background-color: rgba(0,0,255,.1)">Height 75%</div>
				<div class="h-100 d-inline-block" style="width: 120px; background-color: rgba(0,0,255,.1)">Height 100%</div>
			</div>
        	</div>
		<div class="col-sm-4">     	
	        	<div style="height: 100px; background-color: rgba(255,0,0,0.1);" >
				<div class="mh-100" style="width: 100px; height: 200px; background-color: rgba(0,0,255,0.1);">Max-height 100%</div>
			</div>     
       		</div>
	</div>
</div>

Adbot
ADBOT LOVES YOU

Capri Sun Tzu
Oct 24, 2017

by Reene

stoops posted:

I use bootstrap alot but I still don't know how some things work,.

I have a standard bootstrap page: one container, with one row with 2 columns. I want the columns to fill up the whole page 100% height. I thought I could do that using bootstrap sizing, but it's relative to the parent.

How do I make it take up the whole page?

Any help is appreciated.

My code is below, or you could just click my page

Yes, normally you would resize the parent container. Are you trying to make the columns fill up the page but keep the parent row size fixed at 100px? I don't really understand why but you could do this by setting columns to 25vh, 100vh etc.

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