Skip to content

Instantly share code, notes, and snippets.

View cedricblondeau's full-sized avatar
💻✈️📷🍻🐱⚽️🥾🏕️⛰️

Cédric Blondeau cedricblondeau

💻✈️📷🍻🐱⚽️🥾🏕️⛰️
View GitHub Profile
@cedricblondeau
cedricblondeau / cats.gif
Last active September 16, 2019 20:05
🐱
cats.gif
@cedricblondeau
cedricblondeau / go-simple-calculator.md
Last active November 7, 2016 03:37
Evaluates string expressions with positives integers, parentheses and +/- operators only.

go-simple-calculator

Evaluates string expressions with positives integers, parentheses and +/- operators only.

Method #1 - Calculate & Replace

Naive way to solve an expression, like a human would do with paper and pen.

Example:

| | Input | Output |

@cedricblondeau
cedricblondeau / phoneletters.go
Last active November 2, 2016 00:52
Generates all the words that can be made for given a phone number.
package phoneletters
import (
"bytes"
"strconv"
"strings"
)
// Generator is a word generator for phone numbers
type Generator struct {
@cedricblondeau
cedricblondeau / ImageChooser.php
Created January 14, 2016 02:40
Image Chooser for Magento2 widgets
<?php
namespace Vendor\Module\Block\Adminhtml\Widget;
class ImageChooser extends \Magento\Backend\Block\Template
{
/**
* @var \Magento\Framework\Data\Form\Element\Factory
*/
protected $_elementFactory;