How to avoid code duplication in two similar projects?

We have a website with a lot of functionality, and we now start another one, which should have a lot of common code with the first one.

What would be the best approach to avoid code duplication?

Possible solutions we consider:

  • put these projects within one parent directory (but in separate git repositories), and just use components of the first project from the second one
  • move common functionality to separate repository (this would require for us the rewrite a lot of code)
  • just copy code from one project to another
  • do everything inside one directory and check Host http-header to separate logic for each site
  • (maybe there are other variants)

What are the best practices for this situation?

Ad companies similar to Propeller Ads for Forex niche

I'm looking for ad networks similar to Propeller ads that would work very well with a Forex niche. I'm thinking about using Propeller Ads but the support wasn't very helpful and may consider using someone else.

I was wondering if push notification ads for Forex niche would work. I would be interested in trying different types of ads in similar ad networks I just want to know which ad types have the best chance of converting with my niche?

How to mechanically handle damage-over-time Stunts (or similar attack-modifying effects)?

There are many character concepts whose attacks don’t hit all at once, but rather have a form of delayed gratification – they seem weak or even negligible when they hit, but then they keep hurting and hurting for quite a while, paying off for the delay.

Probably the most often talked about but always rather vaguely explained$ ^1$ example would be On Fire, such as the bounty hunter shoots an incendiary missile, setting the Sith warrior on fire, and while it didn’t make a big blast (filling an ordinary or even negligible amount of Stress and Consequence Boxes compared to a usual attack), now time is on the bounty hunter’s side, as the sticky fuel mix is hurting the mighty warrior with each passing moment.

Of course it doesn’t have to be fire – cinematic poisons, superscience devourer nanoswarms, and magical rotting curses can also be like that.

What I’m seeking:

  • Answers which are either RAW, or well-balanced, or preferably both (if there’s a RAW answer that is too weak or too strong, I’d like to know of the issues it has, and what adjustments would fix them).
  • Either replacing a damage-upfront attack with a DoT one, or tacking a DoT onto an attack, such that after the successful application, the target will either reliably take, or risk taking damage repeatedly for some amount of time (usually per turn).
  • Any and all of: a Stunt that gives either ability, and/or a way in which anyone can attempt this (either the replacement or the tack-on).
  • Preference for being to able to do this without needing a Success with Style (see precedent below).

The precedent for the system² handling ongoing damage I could find is a weapon Stunt in Mecha vs. Kaiju, page 55, but it says nothing about handling the damage itself in the PC-compatible part, to the point that I have to wonder if it’s meant to be just flowery prose with no mechanical backing:

Ongoing: The target hit by this attack is tagged with the aspect “Ongoing Damage”. To overcome this advantage the target must make a Physique check. If you succeed with style you re- ceive a free invoke of “Ongoing Damage” instead of a boost.

There is an example that’s more detailed, but it comes from Kaiju Stunts, which the book admits are more powerful than PC/mecha stunts, and is a stunt chain:

Poison: When this attack succeeds with style the kaiju creates the Aspect “Poisoned” on the target with a free invoke instead of a boost. A mecha pilot can be Poisoned through contamination of their life-support system.

Ongoing Poison: Anyone with the “Poisoned” aspect will continue to be attacked until it is overcome by a Physique check. The attack skill is based on the kaiju’s Physique, as is the difficulty to overcome the aspect. If the victim is still in combat with the kaiju when they make their Physique check then the roll is opposed.

Now, on one hand, the MvK poison chain seems quite strong if one has good Physique (or another appropriate skill); on the other two it is is an investment of two Stunts after all and it only happens on a Success with Style in that chain. An adjustment of the above Stunts would be a nice answer to this question, assuming it’s made to be (a) more simple/straightforward/clear and (b) fairly balanced against normal Stunts the PCs can take.


$ ^1$ There seems to be a myriad of not-exactly-compatible answers about whether or not a fire should burn each turn, should it provide infinite penalties/negation-of-permissions for combat or noncombat actions etc.

² Based on recent prior experience, I’m deliberately avoiding spelling the name outside the tags, so as to prevent it from becoming a hill I need to choose between abandoning and dying on.

Free font which is similar to Google Product Sans font, to be used in Android Application [on hold]

We would like to use “Google Product Sans font” in our app. However, we also notice that, it is not free according to https://fonts.google.com/license/productsans

Google offers many fonts under open source licenses. This is not one of them. Please see fonts.google.com for options you can use.

We would like to look for an alternative free font, which looks very similar to “Google Product Sans font”, to be used in our Android application. Do you have any recommendation for that?

Thanks.

Has anyone observed similar change in behavior

For the last week or so, I have seen different Googlebot behavior compared to the last three months. It used to be that my site would be visited once a day, every day, and that new pages would be picked up and indexed a few hours after Googlebot's reading of the page that links to them.
However, this is not the case anymore. Googlebot still visits every day, but new pages are not being picked up. This has been going on for almost a week now; I have seen the odd hit on a new page (all html,…

Has anyone observed similar change in behavior

Two similar sites, once Apache instance, url rewrite works on one but not the other

My rewrite rules are designed to hide my directory structure and to make URLs easier to read. the gcems site works as expected while the vigotwpfd site will not load the files beyond the first page as well as throwing an error on the first page.

Here is my setup: Development platform: Both sites work as intended.

“Live / Testing” platform: one machine running one instance of Apache2.4. on linux

One dynamic ip connection to the internet.

Two host names, both using duckdns.org as my dynamic IP provider. gcems.duckdns.org vigotwpfd.duckdns.org and setup as virtual hosts.

both sites are running PHP7.x

Both sites are setup very similar. Same directory structure. File structures are similar. Both use URL re-writing rules, which are identical with the exception that the URL rules for gcems point to gcems and the rules for vigotwpfd point to vigotwpfd.

The apache domain config files and .htacess files are also identical, with the exception of gcems vs vigotwpfd.

The following is a simplified directory / file structure for both domains. vigotwpfd ==> /var/www/vigotwpfd gcems ==> /var/www/html

/var/www/site/ |-- assets |   |-- css |   |   `-- view.css |   |-- gallery |   |   `-- blank.jpg |   |-- htc |   |   `-- iepngfix.htc |   |-- images |   |   `-- <image files> |   `-- js |       `-- <javascript files> |-- classes |   |-- Bootstrap.php |   |-- Controller.php |   |-- Messages.php |   `-- Model.php |-- controllers |   `-- <controller files> |-- models |   `-- <models files> |-- views |   |-- <other directories and php web pages> |   `-- main.php |-- config.php |-- .htaccess `-- index.php 

.htaccess

Options +FollowSymLinks RewriteEngine on RewriteRule ^([a-zA-Z]*)/?([a-zA-Z]*)?/?([a-zA-Z0-9]*)?/?$   index.php?controller=$  1&action=$  2&id=$  3 [NC,L] Options +FollowSymLinks RewriteEngine on  RewriteCond %{SERVER_PORT} 80 # This checks to make sure the connection is not already HTTPS -  port 80 indicates a non-secured HTTP conection.  RewriteRule ^(.*)$   https://site.duckdns.org/$  1 [R=301,L] # This rule will redirect users from their original location to the same location but using HTTPS.  RewriteRule ^([a-zA-Z]*)/?([a-zA-Z]*)?/?([a-zA-Z0-9]*)?/?$   index.php?controller=$  1&action=$  2&i$   

apache2/sites-enabled/gcems.duckdns.org.conf

<VirtualHost *:80>         ServerAdmin webmaster@localhost         ServerName gcems.duckdns.org         ServerAlias *.gcems.duckdns.org         DocumentRoot /var/www/html          ErrorLog $  {APACHE_LOG_DIR}/gcems_error.log         CustomLog $  {APACHE_LOG_DIR}/gcems_access.log combined </VirtualHost> 

error message found in vigotwpfd_error.log

[Mon Nov 05 08:33:40.101435 2018] [:error] [pid 2993] [client 107.77.210.136:29694] PHP Notice:  Undefined index: controller in /var/www/vigotwpfd/classes/Bootstrap.php on line 38, referer: https://vigotwpfd.duckdns.org/ [Mon Nov 05 08:33:40.101670 2018] [:error] [pid 2993] [client 107.77.210.136:29694] PHP Stack trace:, referer: https://vigotwpfd.duckdns.org/ [Mon Nov 05 08:33:40.101784 2018] [:error] [pid 2993] [client 107.77.210.136:29694] PHP   1. {main}() /var/www/vigotwpfd/index.php:0, referer: https://vigotwpfd.duckdns.org/ [Mon Nov 05 08:33:40.101914 2018] [:error] [pid 2993] [client 107.77.210.136:29694] PHP   2. Bootstrap->__construct() /var/www/vigotwpfd/index.php:60, referer: https://vigotwpfd.duckdns.org/ [Mon Nov 05 08:33:40.102365 2018] [:error] [pid 2993] [client 107.77.210.136:29694] PHP Notice:  Undefined index: action in /var/www/vigotwpfd/classes/Bootstrap.php on line 45, referer: https://vigotwpfd.duckdns.org/ [Mon Nov 05 08:33:40.102488 2018] [:error] [pid 2993] [client 107.77.210.136:29694] PHP Stack trace:, referer: https://vigotwpfd.duckdns.org/ [Mon Nov 05 08:33:40.102556 2018] [:error] [pid 2993] [client 107.77.210.136:29694] PHP   1. {main}() /var/www/vigotwpfd/index.php:0, referer: https://vigotwpfd.duckdns.org/ [Mon Nov 05 08:33:40.102630 2018] [:error] [pid 2993] [client 107.77.210.136:29694] PHP   2. Bootstrap->__construct() /var/www/vigotwpfd/index.php:60, referer: https://vigotwpfd.duckdns.org/ 

https://github.com/pavulon18/vigotwp
https://github.com/pavulon18/gcas_timesheet_php_website

Here are my theories:
1) There is an issue in the URL rewrite system
2) There is an issue in the apache configs (either for the vigotwpfd site or the server itself
3) My code is messed up.

I have ran vigotwpfd step by step through a debugger but I have yet to find out where my problem is.

If this is not the proper place for this question, please point me to where I need to go.

Thank you.

Any Chrome Extension: Currency Converter Alternative? Similar minimalist clean functioning?

Any Chrome Extension: Currency Converter Alternative? Similar minimalist clean functioning?

Extension is gone but using its hash I’ve found some references to it:

Chrome Extension Hash: lncdobdbibdgoiohgnflmjajfphcnakg

https://addons.mozilla.org/en-US/firefox/addon/currency-converter-ff/

About this extension

Firefox port of Chrome extension ‘Currency Converter‘ originally by Mattia Maestrini
(https://chrome.google.com/webstore/detail/currency-converter/lncdobdbibdgoiohgnflmjajfphcnakg).

All credit goes to him as the original developer.
I have simply tweaked the code to let it run on Firefox.

by

https://addons.mozilla.org/en-US/firefox/user/rossbyrne/

enter image description here

2003 Domain, similar to Truelancer.com

Why are you selling this site?
I need money to fund another project.

How is it monetized?
Not currently monetized. Since there is daily visitors you can easily monetize it.

Does this site come with any social media accounts?
No.

How much time does this site take to run?
10 minutes.

What challenges are there with running this site?
The effort you put in is what you get out.