Skip to content

Instantly share code, notes, and snippets.

Thomas Petracco tompec

Block or report user

Report or block tompec

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@tompec
tompec / EmailLog.php
Created Jan 9, 2020
Laravel Nova resource for the EmailLog model from https://github.com/tompec/laravel-email-log
View EmailLog.php
<?php
namespace App\Nova;
use Illuminate\Http\Request;
use Laravel\Nova\Fields\Boolean;
use Laravel\Nova\Fields\DateTime;
use Laravel\Nova\Fields\ID;
use Laravel\Nova\Fields\MorphOne;
use Laravel\Nova\Fields\Text;
@tompec
tompec / mailchimp-newsletter-bulma.html
Created Oct 7, 2017
Simple Bulma template for Mailchimp embedded form with input group
View mailchimp-newsletter-bulma.html
<!DOCTYPE html>
<html>
<head>
<title>Mailchimp newsletter</title>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/bulma/0.5.3/css/bulma.min.css" crossorigin="anonymous">
<style>
div.mce_inline_error {
color: red;
@tompec
tompec / mailchimp-newsletter-bootstrap.html
Last active Apr 14, 2019
Simple Bootstrap template for Mailchimp embedded form with input group
View mailchimp-newsletter-bootstrap.html
<!DOCTYPE html>
<html>
<head>
<title>Mailchimp newsletter</title>
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" integrity="sha384-BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va+PmSTsz/K68vbdEjh4u" crossorigin="anonymous">
<style>
div.mce_inline_error {
color: red;
@tompec
tompec / gist:bc546b2222b233e571bec987904a797b
Created Jun 22, 2017
Redirect IP to domain name in NGINX
View gist:bc546b2222b233e571bec987904a797b
server {
server_name 123.456.789.123;
return 301 $scheme://www.domain.com$request_uri;
}
@tompec
tompec / gist:5d2d7b51c918c5c1429c503b9109b57b
Created May 20, 2017
Leverage browser caching for Nginx server
View gist:5d2d7b51c918c5c1429c503b9109b57b
server {
# Leverage browser caching
location ~* \.(jpg|jpeg|png|gif|ico|css|js|pdf)$ {
expires 7d;
}
}
@tompec
tompec / bulma.blade.php
Last active Feb 8, 2020
Bulma blade template for Laravel 5.4 pagination
View bulma.blade.php
@if ($paginator->hasPages())
<nav class="pagination is-centered">
@if ($paginator->onFirstPage())
<a class="pagination-previous" disabled>Previous</a>
@else
<a href="{{ $paginator->previousPageUrl() }}" rel="prev" class="pagination-previous">Previous</a>
@endif
@if ($paginator->hasMorePages())
<a class="pagination-next" href="{{ $paginator->nextPageUrl() }}" rel="next">Next</a>
You can’t perform that action at this time.