Skip to content

Instantly share code, notes, and snippets.

View gthouret's full-sized avatar

Guy Thouret gthouret

View GitHub Profile
@gthouret
gthouret / string_parser.md
Last active February 4, 2020 12:01
String Parser Challenge

String parser challenge

The aim is to create a string parser which replaces one or more pieces of placeholder text with data from an object map.

Important: Make sure you also view our coding challenge guidelines.

The brief

Your parser will take a string (example below), and replace one or more pieces of placeholder text with data held in an object (example below). It should give the expected output shown below.

FLG coding challenges

Approaching the challenge

  • Only take a few hours at most to complete your challenge.
  • If you don't have time to complete it, that's perfectly OK. It's important that the work you do provide is high quality (production ready).
  • You can use boilerplate code to kick off the project, but make sure you explain this in the README.
  • Create your own repository for this project and commit very frequently, so we can see how your work progresses over time.
  • When you're done, share a link to your repository with us.

Birthdays app challenge

The aim is to create a small web app that allows you to keep track of birthdays.

When you open the app, you'll be able to see whose birthdays are today, or coming up in the next 2 weeks. It will also tell you how old they are (or will be).

Important: Make sure you also view our coding challenge guidelines.

Main features

@gthouret
gthouret / query_coturn_with_id.js
Created April 25, 2019 14:43
Query a TURN server from JS passing a UUID as an identifier to find the client's real IP address
function makeIdReq(id){
var RTCPeerConnection = window.RTCPeerConnection
|| window.mozRTCPeerConnection
|| window.webkitRTCPeerConnection;
var mediaConstraints = {
optional: [{RtpDataChannels: true}]
};
var servers = {iceServers: [{urls: "turn:35.195.223.91:3478", username: id, credential: "testcred"}]};
@gthouret
gthouret / ConfigurableTrait.php
Created January 31, 2017 22:34
PHP Trait for validating a key=>value configuration array
<?php
namespace Patterns;
trait ConfigurableTrait {
private $requiredConfigKeys;
private function validateConfiguration($config)
{
if (empty($config))