Skip to content

Instantly share code, notes, and snippets.

View lucascardial's full-sized avatar
:shipit:
Full Stack

Lucas Cardial lucascardial

:shipit:
Full Stack
View GitHub Profile
@lucascardial
lucascardial / install-php-amqp.sh
Created September 18, 2020 18:29 — forked from wcomnisky/install-php-amqp.sh
Install PHP AMQp on MacOS
#!/bin/bash
brew search librabbitmq
brew install rabbitmq-c
pecl install amqp
# set the path to librabbitmq install prefix [autodetect] : /usr/local/Cellar/rabbitmq-c/0.10.0
# if it fails follow the following (reference: https://github.com/pdezwart/php-amqp/issues/355#issuecomment-563203121):
@lucascardial
lucascardial / redux-saga-typeguard.ts
Created June 29, 2020 17:44 — forked from NoriSte/redux-saga-typeguard.ts
Redux-saga + Typescript: implementing typeguard for Axios AJAX requests
import { AxiosResponse } from "axios";
// the kind of data I expect from the AJAX request...
interface AuthData {
access_token?: string;
refresh_token?: string;
}
// ... a type dedicated to the Axios response...
type AuthResponse = AxiosResponse<AuthData>;
@lucascardial
lucascardial / project-create.sh
Created January 17, 2019 16:08 — forked from francoisromain/project-create.sh
A bash script to create a Git post-receive hook to deploy after a Git push
#!/bin/bash
# Call this file with `bash ./project-create.sh project-name [service-name]`
# - project-name is mandatory
# - service-name is optional
# This will creates 4 directories and a git `post-receive` hook.
# The 4 directories are:
# - $GIT: a git repo
# - $TMP: a temporary directory for deployment