Skip to content

Instantly share code, notes, and snippets.

@ambersariya
ambersariya / architecture.md
Last active November 10, 2022 14:23
Architecture reading list

"Our Job as Architect is to be the 3 year old version of ourselves and keep asking questions, because everyone keeps bringing us solutions rather than problems."

Resources

Videos/Articles below:

Keynote 'Stories Every Developer Should Know' Neal Ford, Director, ThoughtWorks

https://www.youtube.com/watch?v=LlzVx3jHQIY

Katas:

@ambersariya
ambersariya / install-firefox-developer
Last active July 27, 2021 09:06
Install Latest Firefox Developer Edition
#!/usr/bin/env bash
FIREFOX_HOME_LOCAL_BIN=$HOME/.local/bin/
echo "Installing latest firefox developer edition in ${FIREFOX_HOME_LOCAL_BIN}"
mkdir -p $FIREFOX_HOME_LOCAL_BIN
wget "https://download.mozilla.org/?product=firefox-devedition-latest-ssl&os=linux64&lang=en-US" -O firefox.tar.bz2
echo "Downloaded latest firefox developer edition"
@ambersariya
ambersariya / tw-tech-test-merchants-guide.md
Last active October 27, 2022 15:34
Thoughtworks Tech Test

Merchant's Guide to Galaxy

You decided to give up on earth after the latest financial collapse left 99.99% of the earth's population with 0.01% of the wealth. Luckily, with the scant sum of money that is left in your account, you are able to afford to rent a spaceship, leave earth, and fly all over the galaxy to sell common metals and dirt (which apparently is worth a lot).Buying and selling over the galaxy requires you to convert numbers and units, and you decided to write a program to help you.The numbers used for intergalactic transactions follows similar convention to the roman numerals and you have painstakingly collected the appropriate translation between them.Roman numerals are based on seven symbols:

Symbol Value

- I 1
- V 5
- X 10
- L 250
@ambersariya
ambersariya / wav_to_m4a_mono.md
Last active November 20, 2017 12:53
Audio conversion with FFMPEG

Convert audio clips to M4a Mono acceptable by AR Studio

e.g. WAV audio to M4a as follows using FFMPEG

$> ffmpeg -i my_audio_clip.wav -ac 1 my_audio_clip.m4a
@ambersariya
ambersariya / CompactBundle.php
Created October 5, 2017 08:24 — forked from FaKleiser/CompactBundle.php
CompactBundle for DDD applications with Symfony. See this blog post for more information: http://www.fabian-keller.de/blog/domain-driven-design-with-symfony-a-folder-structure
<?php
namespace Fk\Core\Infrastructure\Bundle;
use Symfony\Component\HttpKernel\Bundle\Bundle;
/**
* The compact bundle combines a bundle definition with an {@link ExtensionInterface} to provide sound defaults for
* implementing custom bundles.
*/
abstract class CompactBundle extends Bundle
@ambersariya
ambersariya / video-fix-videos-for-pseudo-streaming.md
Created October 4, 2017 18:35 — forked from alienresident/video-fix-videos-for-pseudo-streaming.md
How to: Fix pseudo-streaming videos by moving Moov Atom
How to:

Fix pseudo-streaming videos by moving Moov Atom

Relies on some *nix CLI utilities: mediainfo; and qt-faststart (part of ffmpeg). I used homebrew to install them on OS X.

What is pseudo-streaming?

Pseudo streaming is simply a video that can start playing before it's fully dowmloaded. The videos are not streaming but rather progressively downloaded. What's important is that the file metadata (the Moov Atom) is at the start of the file rather than at the end. Usually this is an option set when encoding the file (called quick start or web start). If the files have not been encoded this way you can either re-encode or use a utility to move the Moov Atom. Re-encoding takes much longer than using a utility to move the Moov Atom so here's how to do it.

Steps

First check with mediainfo to see if video 'is streamable':

@ambersariya
ambersariya / AD-XX-template.md
Created October 3, 2017 10:27 — forked from FaKleiser/AD-XX-template.md
Architecture Decision Template

AD-XX: <TOPIC - short, concise summary>

  • Date: <DATE - when the decision was made>
  • Deciders: <DECIDERS - list everyone involved in the decision>
  • Status: [PROPOSED | ACCEPTED | SUPERSEDED | DEPRECATED]
  • Category: <CATEGORY - use a simple grouping to help organize the set of decisions (e.g. backend, payment, user management, ...)>

Related