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]; |
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
| <?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))); |
| // 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 | |
| /* @var $installer Mage_Core_Model_Resource_Setup */ | |
| $installer = $this; | |
| $installer->startSetup(); | |
| $connection = $installer->getConnection(); | |
| $identifier = 'id-goes-here'; | |
| $title = 'Title Goes Here'; |
| import socket | |
| host = 'localhost' | |
| port = 1234 | |
| buf = 1024 | |
| clientsocket = socket.socket(socket.AF_INET, socket.SOCK_STREAM) | |
| clientsocket.connect((host, port)) | |
| print "Sending 'test1\\n'" |
| # not sure how yet to capture the output and stream it back | |
| IO.puts "Calling..." | |
| { output, exit_code } = System.cmd("bundle", ["outdated"]) | |
| IO.puts "Exit code is #{exit_code}" | |
| IO.puts "Output is #{output}" |
| var myScript = document.createElement('script'); | |
| myScript.src = 'http://code.jquery.com/jquery-2.1.4.min.js'; | |
| myScript.onload = function() { | |
| console.log('jQuery loaded.'); | |
| }; | |
| document.body.appendChild(myScript); |
| diff --git a/skin/frontend/rwd/default/js/configurableswatches/product-media.js b/skin/frontend/rwd/default/js/configurableswatches/product-media.js | |
| index 17fd81f..5726200 100644 | |
| --- a/skin/frontend/rwd/default/js/configurableswatches/product-media.js | |
| +++ b/skin/frontend/rwd/default/js/configurableswatches/product-media.js | |
| @@ -65,8 +65,11 @@ var ConfigurableMediaImages = { | |
| }); | |
| }); | |
| + compatibleProducts.sort(); | |
| + |
Bom, este é um recurso, como muitos outros, bem escondido do git. Então resolvi fazer um post para explicar a situação em que pode-se usar e como fazer essa magia negra. 👻
Você provavelmente já adicionou algum dia um arquivo no projeto que não deveria ser commitado certo? E como você fez para ignorar esse arquivo mesmo? Provavelmente adicionou no arquivo .gitignore.
OK então, aí você commitou esse arquivo .gitignore e pronto, mais ninguém poderá criar um arquivo com o mesmo nome e commitar. Mas espera aí! Não era isso que você queria! Você só queria ignorar esse arquivo na sua máquina, se alguém, algum dia por obséquio achar esse um nome bom para seu arquivo, que assim seja.