These are my solutions to the three concurrency exercises from Katrina Owen's Go Post.
I'm posting here with example output in the hopes that someone call tell me how to do it better
| // Run this in the F12 javascript console in chrome | |
| // if a redirect happens, the page will pause | |
| // this helps because chrome's network tab's | |
| // "preserve log" seems to technically preserve the log | |
| // but you can't actually LOOK at it... | |
| // also the "replay xhr" feature does not work after reload | |
| // even if you "preserve log". | |
| window.addEventListener("beforeunload", function() { debugger; }, false) |
| <?php | |
| class Dilmas extends \SplFloat | |
| { | |
| public function __construct($value) | |
| { | |
| $currency = json_decode(file_get_contents('http://api.fixer.io/latest?base=USD&symbols=BRL'), true); | |
| $brl =(float) $currency['rates']['BRL']; | |
| parent::__construct(((float) round($value / $brl, 2))); |
These are my solutions to the three concurrency exercises from Katrina Owen's Go Post.
I'm posting here with example output in the hopes that someone call tell me how to do it better
| #include <FastLED.h> | |
| #define NUM_LEDS 24 | |
| #define NUM_DOTS 3 | |
| #define DATA_PIN 0 | |
| #define MAX_SPEED 60 | |
| using namespace std; | |
| CRGB leds[NUM_LEDS]; |
| # Becomes /etc/letsencrypt/cli.ini. | |
| # This is an example of the kind of things you can do in a configuration file. | |
| # All flags used by the client can be configured here. Run Let's Encrypt with | |
| # "--help" to learn more about the available options. | |
| # Use a 4096 bit RSA key instead of 2048 | |
| rsa-key-size = 4096 | |
| # Uncomment and update to register with the specified e-mail address |
| alias Rebirth.Subscription | |
| alias Ecto.Query | |
| Subscription |> Query.where([s], not is_nil(s.user_id)) |
| <?php | |
| /** @var $coll \Magento\Eav\Model\ResourceModel\Entity\Attribute\Collection */ | |
| $coll = $this->_objectManager->create(\Magento\Eav\Model\ResourceModel\Entity\Attribute\Collection::class); | |
| // add filter by entity type to get product attributes only | |
| // '4' is the default type ID for 'catalog_product' entity - see 'eav_entity_type' table) | |
| // or skip the next line to get all attributes for all types of entities | |
| $coll->addFieldToFilter(\Magento\Eav\Model\Entity\Attribute\Set::KEY_ENTITY_TYPE_ID, 4); | |
| $attrAll = $coll->load()->getItems(); |
| Source: https://dba.stackexchange.com/questions/83125/mysql-any-way-to-import-a-huge-32-gb-sql-dump-faster | |
| innodb_buffer_pool_size = 4G | |
| innodb_log_buffer_size = 256M | |
| innodb_log_file_size = 1G | |
| innodb_write_io_threads = 16 | |
| innodb_flush_log_at_trx_commit = 0 | |
| Why these settings ? | |
| innodb_buffer_pool_size will cache frequently read data |