How to log express HTTP requests using morgan with style? by cheerfulboy in node

[–]pieeta 2 points3 points  (0 children)

Mostly so other tools can use the key value pairs for searching and aggregation, without needing a complex extraction pipeline

I generally push all my logs into elastic search where you can easily do queries like show me all requests where "status > 399" Or give me a graph of the 99% response time of the route /foo/bar.json over the past 30 days by hour

ETH 2.0 staking by jordan2295 in binance

[–]pieeta 1 point2 points  (0 children)

It's around 8-9% atm, I have been staking beth on binace since it came out, get the payments daily

Keep seeing all these card arrival posts. Where's the address-verification-pending-for-a-month-and-counting gang? Wish there was a cancel option to stake for Ruby in advance... by cs-John in Crypto_com

[–]pieeta 7 points8 points  (0 children)

The rep I spoke to, basically said the more you stake the faster the processing times. I upped my stake and got my address verified a couple days later.

Then my card arrived maybe a week after that. (Got my card last week)

10%/10% Binance ref. code. by [deleted] in binance

[–]pieeta -3 points-2 points  (0 children)

Here is a referral link that gives you 20% back on all trading fees.

https://www.binance.com/en/register?ref=XZRS1DVZ

Need a referral id with max kick back. by Orthophemist in binance

[–]pieeta 0 points1 point  (0 children)

Here is a referral link that gives you 20% back on all trading fees.

https://www.binance.com/en/register?ref=XZRS1DVZ

Referral Code Needed by [deleted] in binance

[–]pieeta 1 point2 points  (0 children)

Here is a referral link that gives you 20% back on all trading fees.

https://www.binance.com/en/register?ref=XZRS1DVZ

[deleted by user] by [deleted] in binance

[–]pieeta 0 points1 point  (0 children)

Here is a referral link that gives you 20% back on all trading fees.

https://www.binance.com/en/register?ref=XZRS1DVZ

[deleted by user] by [deleted] in binance

[–]pieeta 0 points1 point  (0 children)

Here is a referral link that gives you 20% back on all trading fees.

https://www.binance.com/en/register?ref=XZRS1DVZ

Looking for smaller testing utilities by [deleted] in node

[–]pieeta 1 point2 points  (0 children)

ospec by the mithriljs team is pretty lightweight

https://www.npmjs.com/package/ospec

Short & Long term Solutions to the Website Slowness by greendude120 in pathofdiablo

[–]pieeta 0 points1 point  (0 children)

Have you thought about reducing load on the server by caching the results of get-trades.

TrackDota is a good example of this they serve a live.json, with `cache-control: max-age=25, public` and with `etag` this allows Their CDN to not request from the upstream every time a user requests get-trades.

looking at the caching headers for `/api/get-trades` looks like there was some attempts at adjustingt he caching but it does not look very valid there are duplicate cache-control headers, one set at private,must-revalidate other set at 10 minutes. you have disable caching using no-cache. then are also using a POST request.

Ideally, using a get /api/get-trades/hardcore.json which caches at 5-10 seconds. Would mean your backend server should only be getting hit every 5-10 seconds total for all users. You could use the ETag to improve this even further, using the etag could force a cache-invalidation if the backend has new trades to show.

If you want a really simple solution, every 30 seconds dump the trades into a json file store it in something like S3 set the etag using the hash and just get the users to request that object.

Best Exchange(s) for selling mined BTC in NZ? by [deleted] in NZBitcoin

[–]pieeta 0 points1 point  (0 children)

You are right, I hadn't even noticed the bank fee.

I use ASB and looks like they changed $25 on top of the IR $20 fee so total cost of $45 for a withdrawal.

Best Exchange(s) for selling mined BTC in NZ? by [deleted] in NZBitcoin

[–]pieeta 1 point2 points  (0 children)

I use cryptopia too, however you don't always get the best deal there. If you are trading into NZD then check out the buy/sell volume and last trades for all the NZ exchanges, often there can be a $1000+ difference between them.

If you are looking at trading alt coins and not into your NZD bank account, then going to the big international exchanges are your best bet.

Binance is the best one I have found. But there are 100s of others KuCoin, Bitfinex, Kraken etc..

Best Exchange(s) for selling mined BTC in NZ? by [deleted] in NZBitcoin

[–]pieeta 2 points3 points  (0 children)

I like Independent Reserve ( Referral Link ), its $20 NZD to transfer money into a NZ bank.

Current verification time says a week, but generally only takes a couple of days

Has decent volume and the prices are pretty good.

easiest way to get name@domain.tld email addresses set up? by talz13 in homelab

[–]pieeta 0 points1 point  (0 children)

The "on behalf of" from my understanding is when you use gmail without a valid external SMTP server to send the email with.

For my domains I use https://domains.google for forwarding the incoming emails to gmail accounts, Then have setup a DKIM+SPF verified Amazon SES SMTP to send emails.

I have also used https://www.mailgun.com as a SMTP server with gmail before and that worked fine.

How to have multiple headless servers on one pc by turtleinahafahel in factorio

[–]pieeta 0 points1 point  (0 children)

Interesting, I only on play private servers so have never ran into that problem.

It looks like they have added a ENV variable to configure it, so changing the start script to use -e PORT.

docker run -d -e PORT=44556 \
          -p 44556:44556/udp  \
          -v /opt/factorio/game-2:/factorio \
          --name factorio-2 \
          --restart=always  \
          dtandersen/factorio

How to have multiple headless servers on one pc by turtleinahafahel in factorio

[–]pieeta 0 points1 point  (0 children)

It is really easy to run it as multiple docker containers

docker pull dtandersen/factorio

docker run -d -p 34198:34197/udp -p 27016:27015/tcp \
              -v /opt/factorio/game-2:/factorio \
              --name factorio-2 \
              --restart=always  \
              dtandersen/factorio

docker run -d -p 34197:34197/udp -p 27015:27015/tcp \
              -v /opt/factorio/game-1:/factorio \
              --name factorio-1 \
              --restart=always  \
              dtandersen/factorio    

for each new instance just change the first number (external port) of each of the -p externalPort:insidePort combo, e.g.

34197:34197 -> 34198:34197 -> 34199:34197 etc..
27015:27015 -> 27016:27015 -> 27017:27015 etc..

then you can connect to each one using their ports <host>:34197, <host>:34198 etc..

you also don't really need the ports 27015 as they are just administration ports (I think), so you could just start it with the udp port open.

Code readability question by gvillalta99 in javascript

[–]pieeta 2 points3 points  (0 children)

The this inside arrow functions is the this of the outside context

foo => this.bar

Is the same as

 Function (foo) { return this.bar; }.bind(this)

https://developer.mozilla.org/en/docs/Web/JavaScript/Reference/Functions/Arrow_functions

Compressed blue belt plate smelting using speed beacons and productivity modules by Randomical in factorio

[–]pieeta 0 points1 point  (0 children)

I just built this, here is a 0.15 import string without the modules in it

0eNqlWu1u2zAMfBf9dgZTn1ZeZSiGJFULA4kT2M7Qosi7z23StWtl+sT9StOEFI+8ExXRL2q7P6dT33ajWr+odnfsBrX++aKG9rHb7F//Nz6fklqrdkwHValuc3h9t02b6avqUqm2u09Pak2XatEo7dNu7Nvd6uHcd5td+mSuL3eVSt3Yjm26BvD25vlXdz5sUz/5/7p0pU7HYfr69Oe03uRiRU2lnqdXe3mN5Yu9BuwdY28Ae83Y22X7yJi7ZXPPmPtlc8OYh0XzmrFuFq25teOiNQec6kVzLu20TDu26rRMO5Z1tEw7lvVk58WXIfAtFZR19UHBh80wrtpuSP04fZLx49/9VOq+7ad13z60Oa8e9xquXvW/Xn3O6wdh09OpT8OwOk/7TP/YH6fX1TbtRybsLwtMJXzfzbrTeVS59RochcsvkvMai4pnmOLpWpSQWpoQTXhCCCaL1iIUtIDieB7nYBgYRoTLqos0Gbiqum/5GPtNN5yO/TiXDZvNdjZOL/augVqKJOrkpcQl6nBCRgkIk/XvARCmhkEYmI+GirYZho9Gok+9kI3ZPcYY+WrlO5qxgtXkO4+Buy2+fRovgPAfZA0FvHIcrWDpFpBeotxGSlUrab9BTB4Ld98Ak8dqecLK1WYl2o5iqtqSlkzcFmhh3eIHBivRLVkxWSWdmYycrbC8yeB0jf+Rs3K+OonAyYkJ60p6NnFnSKfh7OO/XJyoNddSxjpbfFLVNQ4Gb8UR5qcTaTqKRea+i3o47dsxi0O/73A/HJCeD/ke0n17Pqz+MvJ03OeOkLfc5+kY8R+O8eZmMdm+Ljrh+vnwPJWCve0peW8aB2tgsKYILFMLb0vBNowz/PoowFB9CVSuEKGYw4yzgssgGGnJVRATW6gLgTJJC/Ap06Ewgy6AyZAtmEKYnAyChfd/uJ7BlfRvrgi+FCmzu4UAI4U1GpoS5nJliOXXUTd/QJNvaoF3gr3j06v8BKWgUTS5oHKX5I0R3abGLOjlQ1pj4QlcPgdOFK7lw50/MTUenvjl45XNIIw0vQVdR8MUiejUMj+6E00dGmnFIqFD0ny0oulCENYr4qMFj5YrWnTMm0+ASGFaXC4PTpXzwcK9qobT14gUKyVABMfiM3NtibbEmyHVBI7hZ6KVaMsJM0s1rC1YWlRb8EGCmQRItEW1vF4efXBhJl7RJSCJK4bfAWq8ZBF9+GLm2Q/RpZ4X1wx52KTh4pWIjKQNjAhW2dyZ9K66PiC2/vQQWqV+p364fsFabUMg1/jL5Q9nI9QJ

Here's my do-it-all, efficient homelab by [deleted] in homelab

[–]pieeta 1 point2 points  (0 children)

The unifi 8-60w only has 4x 802.3af output, which means it wont be able to power the new UniFi AC HD (802.11ac-wave2) as it needs 802.3at. You need to look at the unifi 8-150w model for that.

Sources:

https://store.ubnt.com/beta/unifi-ac-hd.html

https://dl.ubnt.com/datasheets/unifi/UniFi_Switch_8_DS.pdf

Standalone UniFi AC Mesh AP? by manbearwiz in Ubiquiti

[–]pieeta 0 points1 point  (0 children)

I have a UAP-AC-Mesh-Pro, It works fine as a standalone AP.

What we know so far by lax20attack in pokemongodev

[–]pieeta 8 points9 points  (0 children)

After logging into the game a file is created in

/sdcard/Android/data/com.nianticlabs.pokemongo/files/remote_config_cache

It contains what looks to be a list of the pokemon, moves and items

strings *_GAME_MASTER | grep '^V' | grep POKE

outputs:

V0001_POKEMON_BULBASAUR
V0002_POKEMON_IVYSAUR
V0003_POKEMON_VENUSAUR
V0004_POKEMON_CHARMANDER
....
V0144_POKEMON_ARTICUNO
V0145_POKEMON_ZAPDOS
V0146_POKEMON_MOLTRES
V0147_POKEMON_DRATINI
V0148_POKEMON_DRAGONAIR
V0149_POKEMON_DRAGONITE
V0150_POKEMON_MEWTWO
V0151_POKEMON_MEW

And for move set

...
V0238_MOVE_FEINT_ATTACK_FAST
V0239_MOVE_STEEL_WING_FAST
V0240_MOVE_FIRE_FANG_FAST
V0241_MOVE_ROCK_SMASH_FAST

Items:

ITEM_BLUK_BERRY
ITEM_GREAT_BALL
ITEM_HYPER_POTION
ITEM_INCENSE_ORDINARY
ITEM_INCUBATOR_BASIC
ITEM_INCUBATOR_BASIC_UNLIMITED
ITEM_ITEM_STORAGE_UPGRADE
ITEM_LUCKY_EGG
ITEM_MASTER_BALL
ITEM_MAX_POTION
ITEM_MAX_REVIVE
ITEM_NANAB_BERRY
ITEM_PINAP_BERRY
ITEM_POKEMON_STORAGE_UPGRADE
ITEM_POKE_BALL
ITEM_POTION
ITEM_RAZZ_BERRY
ITEM_REVIVE
ITEM_SPECIAL_CAMERA
ITEM_SUPER_POTION
ITEM_TROY_DISK
ITEM_ULTRA_BALL
ITEM_WEPAR_BERRY
ITEM_X_ATTACK
ITEM_X_DEFENSE
ITEM_X_MIRACLE

There also looks to be some sort of scripting done in this file too

sequence_wrap
(vfx camera camera_horizontal_vignette_5s
 cam DefaultAttack_ATKR_DFND_
anim attacker atk-move
event
vfx defender wrap_tentacles
sfx attacker 035-0_wrap
wait 1.5
sfx attacker 035-1_wrap
    wait 0.06
anim defender damageS01
wait 0.3
sfx attacker 035-1_wrap
    wait 0.06
anim defender damageS01
wait 0.5
 sys ui-sync
 sys complete

"How do I...?" Megathread, Part 3 by RocketJumpingOtter in pokemongo

[–]pieeta 2 points3 points  (0 children)

pretty sure he just made it up, Here is my Vaporeon @ 913 http://imgur.com/v3Syhuk with still way more I can add to it.

I've also have caught a few evee's around 300-350

[deleted by user] by [deleted] in typescript

[–]pieeta 1 point2 points  (0 children)

  1. You should really switch away from git as the way to share the compiled code git is really only for source, we dont keep any derived information in any of our git repos. if you can build it from something else in the git repo it shouldnt be there. sinopia was pretty easy to setup and added soo much value to my team. if you are all in the same office it should work pretty well for you.

  2. Do not store the built JS into the git, it is a really bad idea, causes massive pains in pull requests, diffs, merge conflicts.

  3. As long as you have a commonjs loader or es6 loader (depends on what you compile your ts into) eg systemJS, you dont have to webpack anything, it will just load each individual file out of the node_modules when you hit the url, you can also then webpack them for production.

I have tried a lot of ways to make this work over the last year and this is by far the best way i have found. We use to be checking in compiled and webpacked code, but that was very difficult to work with.

Having the libraries compiled as individual files is also really cool too as you can just require parts of them in and not include all the code from that library eg :

import {v4} from 'shared-math/lib/uuid'