Scaling Magento presentation with 60 slides and notes, which was then reviewed by Alan Storm.
<?php | |
/** | |
* Class that validate and retrieve data from PESEL number in object-oriented style | |
* | |
* Example: | |
* $pesel = new Pesel('85042510356'); | |
* $pesel->getBirthday()->format("d-m-Y") | |
* $pesel->getSex() | |
* $pesel->getAge("%a") |
<?php | |
class Sort { | |
public static function radix_sort($input) { | |
$min = min($input); | |
$max = max($input); | |
$temp = array_fill($min, $max - $min + 1, 0); | |
foreach ($input as $key => $val) { | |
$temp[$val]++; | |
} |
#!/usr/bin/env php | |
<?php | |
$mado = new Mado(); | |
try { | |
if (isset($argv[1]) && strlen($argv[1]) > 0) { | |
$mado->run($argv[1], array_slice($argv, 2)); | |
} else { | |
$mado->run('help', null); | |
} | |
} catch (Exception $e) { |
<?php | |
class Product { | |
public function getCheapestProduct() { | |
$data = Mage::getModel("catalog/product")->getCollection() | |
->addAttributeToSelect(Mage::getSingleton("catalog/config")->getProductAttributes()) | |
->addAttributeToFilter('offer', Mage_MultiVendor_Model_Offer::STATE_ACTIVE) | |
->addCategoryFilter($this->getCategory()) | |
->setPage(1, 1) | |
->addMinimalPrice() | |
->addFinalPrice() |
(by @andrestaltz)
So you're curious in learning this new thing called (Functional) Reactive Programming (FRP).
Learning it is hard, even harder by the lack of good material. When I started, I tried looking for tutorials. I found only a handful of practical guides, but they just scratched the surface and never tackled the challenge of building the whole architecture around it. Library documentations often don't help when you're trying to understand some function. I mean, honestly, look at this:
Rx.Observable.prototype.flatMapLatest(selector, [thisArg])
Projects each element of an observable sequence into a new sequence of observable sequences by incorporating the element's index and then transforms an observable sequence of observable sequences into an observable sequence producing values only from the most recent observable sequence.
ProblemType: Crash | |
Architecture: amd64 | |
CrashCounter: 1 | |
Date: Tue Feb 14 14:50:13 2017 | |
Disassembly: | |
=> 0x7f0badc47536 <match+6>: push %r12 | |
0x7f0badc47538 <match+8>: mov %rdi,%r12 | |
0x7f0badc4753b <match+11>: push %rbp | |
0x7f0badc4753c <match+12>: push %rbx | |
0x7f0badc4753d <match+13>: sub $0x1b8,%rsp |
This guide was written because I don't particularly enjoy deploying Phoenix (or Elixir for that matter) applications. It's not easy. Primarily, I don't have a lot of money to spend on a nice, fancy VPS so compiling my Phoenix apps on my VPS often isn't an option. For that, we have Distillery releases. However, that requires me to either have a separate server for staging to use as a build server, or to keep a particular version of Erlang installed on my VPS, neither of which sound like great options to me and they all have the possibilities of version mismatches with ERTS. In addition to all this, theres a whole lot of configuration which needs to be done to setup a Phoenix app for deployment, and it's hard to remember.
For that reason, I wanted to use Docker so that all of my deployments would be automated and reproducable. In addition, Docker would allow me to have reproducable builds for my releases. I could build my releases on any machine that I wanted in a contai
It's come to my attention that some people have been spamming issue trackers with a link to this gist. While it's a good idea to inform people of the situation in principle, please do not do this. By all means spread the word in the communities that you are a part of, after verifying that they are not aware yet, but unsolicited spam is not helpful. It will just frustrate people.
A number of things have happened since the last update.