Skip to content

Instantly share code, notes, and snippets.

View emmanuelbarturen's full-sized avatar
🌱
Give me an challenge

Emmanuel Barturen emmanuelbarturen

🌱
Give me an challenge
View GitHub Profile
@emmanuelbarturen
emmanuelbarturen / System Design.md
Created November 12, 2022 03:00 — forked from vasanthk/System Design.md
System Design Cheatsheet

System Design Cheatsheet

Picking the right architecture = Picking the right battles + Managing trade-offs

Basic Steps

  1. Clarify and agree on the scope of the system
  • User cases (description of sequences of events that, taken together, lead to a system doing something useful)
    • Who is going to use it?
    • How are they going to use it?
@emmanuelbarturen
emmanuelbarturen / create_package_for_laravel.md
Last active August 17, 2022 20:01
Build a laravel package on laravel homestead

Directory Structure

code 
└───dev-packages
│   │
|   └─── <vendor-name>
│   │   |
|   |   └─── <package-name>
│   │   |   | README.md
@emmanuelbarturen
emmanuelbarturen / FirebaseService.php
Created February 16, 2018 00:29
Firebase rest with guzzle
<?php namespace App\Services;
use GuzzleHttp\Client;
use GuzzleHttp\Exception\ClientException;
/**
* Class FirebaseService
* @package App\Services
*/
class FirebaseService
@emmanuelbarturen
emmanuelbarturen / testing mail in droplet with laravel
Created November 3, 2017 23:12
send email from artisan with tinker of laravel
# SSH into droplet
# go to project
$ php artisan tinker
$ Mail::send('errors.401', [], function ($message) { $message->to('emmanuelbarturen@gmail.com')->subject('this works!'); });
# check your mailbox
@emmanuelbarturen
emmanuelbarturen / hosts
Created April 22, 2021 16:46 — forked from lanlee212/hosts
Hosts
#Social Networking Websites Blocker
#Updated 01/01/2012 (dd/mm/yyyy)
#Opensource project by WingAdmiral from Sourceforge
127.0.0.1 localhost
::1 localhost
#Web Addresses that will be blocked
@emmanuelbarturen
emmanuelbarturen / cashier.php
Created November 5, 2020 01:32 — forked from Braunson/cashier.php
Extending the Laravel package Cashier for creating an customer without a credit card
namespace Acme\V1\Billing;
// BillableInterface.php
use Laravel\Cashier\BillableInterface as CashierInterface;
interface BillableInterface extends CashierInterface {
}
@emmanuelbarturen
emmanuelbarturen / steps.txt
Created January 3, 2018 02:38
configure sendmail in a ubuntu droplet
1) If sendmail isn't installed, install it: apt-get install sendmail
2) Configure hosts file correctly: nano /etc/hosts
Looked like:
127.0.1.1 myhostname myhostname
127.0.0.1 localhost
3) $ sudo sendmailconfig
4) test
$echo "Subject: sendmail test" | sendmail -v my@email.com
@emmanuelbarturen
emmanuelbarturen / app.js
Last active September 10, 2020 16:01
Api Calls Queue with Vuejs 2
const app = new Vue({
el: '#tool-app',
data() {
return {
tivs: [],
nextKey: 0
}
},
mounted() {
API.getAllTIV().then(response => {
@emmanuelbarturen
emmanuelbarturen / check mail with tinker
Last active July 25, 2020 18:59
check if mail service working correctly from artisan
# ssh into the server
# go to the laravel project
$ php artisan tinker
# Example 1 , from view
$ Mail::send('errors.401',[],function($message){$message->to('emmanuelbarturen@gmail.com')->subject('this works!');});
# Example 2, plain text
Mail::raw('Hi Mail Service',function($message){$message->to('emmanuelbarturen@gmail.com')->subject('this works!');});
@emmanuelbarturen
emmanuelbarturen / commands gulp on homestead
Last active October 20, 2019 04:15
Install browserSync on Homestead (vagrant)
$ npm cache clear (optional)
$ npm install --no-bin-links
$ npm install laravel-elixir --save-dev --no-bin-link
$ npm install laravel-elixir-livereload --save-dev --no-bin-links
#configurar gulpfile.js
$gulp watch