Skip to content

Instantly share code, notes, and snippets.

View delineas's full-sized avatar
🚀
Launching...

Daniel Primo delineas

🚀
Launching...
View GitHub Profile
@delineas
delineas / 2018_11_05_170704_add_hash_id_fields_users_table.php
Created November 5, 2018 17:11
Laravel Artisan Migrate Create Field
<?php
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class AddHashIdFieldsUsersTable extends Migration
{
/**
* Run the migrations.
@delineas
delineas / app.js
Created October 31, 2018 18:27
Vee-Validate Vue User
import VeeValidate from "vee-validate";
import Axios from "axios";
Vue.use(VeeValidate);
VeeValidate.Validator.extend("unique", {
getMessage: field => "Ya existe un usuario con este e-mail",
validate: value => {
console.log(value);
if (value) {
@delineas
delineas / react.html
Created October 30, 2018 19:53
React Tutorial
<!DOCTYPE html>
<!--[if lt IE 7]> <html class="no-js lt-ie9 lt-ie8 lt-ie7"> <![endif]-->
<!--[if IE 7]> <html class="no-js lt-ie9 lt-ie8"> <![endif]-->
<!--[if IE 8]> <html class="no-js lt-ie9"> <![endif]-->
<!--[if gt IE 8]><!-->
<html class="no-js">
<!--<![endif]-->
<head>
<meta charset="utf-8">
@delineas
delineas / semanticgit.md
Last active December 12, 2020 12:05
Semantic GIt
@delineas
delineas / branch-organization.md
Created October 23, 2018 22:30 — forked from wilmoore/branch-organization.md
Branch Organization

Scenario

Work is done within a feature branch created from master. You've incrementally gotten the feature branch working as expected; however, you'd prefer to re-organize your commits so that you can better reason about the changes.

Setup

Let's create a new repository in order to set the stage:

 % mkdir repo
 % cd repo

% git init

@delineas
delineas / drupal8-links.php
Created July 24, 2018 18:35 — forked from colorfield/drupal8-links.php
Drupal 8 links, or where is my l() function
@delineas
delineas / TermBreadcrumbBuilder.php
Created July 16, 2018 19:14 — forked from eeeschwartz/TermBreadcrumbBuilder.php
Load breadcrumbs from a Drupal 8 node's taxonomy term
<?php
/**
* @file
* Contains \Drupal\taxonomy\TermBreadcrumbBuilder.
*/
namespace Drupal\taxonomy;
use Drupal\Core\Breadcrumb\BreadcrumbBuilderInterface;
Twig coding standards
https://www.drupal.org/node/1823416
Filters - Modifying Variables In Twig Templates
https://www.drupal.org/node/2357633
{% for i, value in content.field_app_prod_toggle_products %}
{% if node.field_app_prod_toggle_products[i].entity %}
{% if i == 0 %}
@delineas
delineas / mailchimp-subscribe.js
Last active April 30, 2018 17:14 — forked from chrsgrffth/mailchimp-subscribe.coffee
Vue – Mailchimp Subscribe Component
/*
* decaffeinate suggestions:
* DS102: Remove unnecessary code created because of implicit returns
* Full docs: https://github.com/decaffeinate/decaffeinate/blob/master/docs/suggestions.md
*/
// To get the `action` prop:
//
// 1. Go to your dashboard on mailchimp.com and navigate
// to Lists > Signup Forms > Embedded Forms.
//
@delineas
delineas / bash.sh
Created April 23, 2018 19:22
install docker compose
curl -L https://github.com/docker/compose/releases/download/1.20.1/docker-compose-`uname -s`-`uname -m` -o /usr/bin/docker-compose
chmod +x /usr/bin/docker-compose