Skip to content

Instantly share code, notes, and snippets.

View danielnv18's full-sized avatar

Daniel Noyola danielnv18

View GitHub Profile
import { TestBed } from '@angular/core/testing';
import { AngularFireAuth } from '@angular/fire/auth';
import { AngularFirestore } from '@angular/fire/firestore';
import { BehaviorSubject } from 'rxjs';
import { AngularFireModule } from '@angular/fire';
import { AngularFireAuthModule } from '@angular/fire/auth';
import { AuthService } from './auth.service';
const FirestoreStub = {
collection: (name: string) => ({
@danielnv18
danielnv18 / Dockerfile
Last active January 20, 2020 14:38
Docker with php 7.3 with unixodbc, Microsoft ODBC Driver 17 for Linux and pdo_sql
FROM php:7.3-fpm
MAINTAINER Daniel Noyola <[email protected]>
# Install Dependencies
RUN apt-get update && apt-get install -y locales unixodbc libgss3 odbcinst \
devscripts debhelper dh-exec dh-autoreconf libreadline-dev libltdl-dev \
unixodbc-dev wget unzip \
&& rm -rf /var/lib/apt/lists/* \
&& docker-php-ext-install pdo \
@danielnv18
danielnv18 / .ahoy.yml
Last active March 12, 2019 20:51
Run ahoy with the wodby images for drupal
ahoyapi: v2
commands:
ps:
cmd: docker-compose ps "$@"
usage: List containers.
start:
cmd: docker-compose start "$@"
usage: Start services.
import { Injectable } from '@angular/core';
import { Request, Http, RequestMethod, RequestOptions, URLSearchParams, Headers } from '@angular/http';
import { ENV } from '../environment/environment';
import 'rxjs/add/operator/map';
@Injectable()
export class Api {
url: string = ENV.API_URL;
constructor(public http: Http) { }
@danielnv18
danielnv18 / Dockerfile
Last active March 24, 2021 18:38
Docker with php 7.0 with unixodbc, Microsoft ODBC Driver 13 for Linux and pdo_sql
FROM php:7.0.10-fpm
MAINTAINER Daniel Noyola <[email protected]>
# install the PHP extensions we need
RUN apt-get update && apt-get install -y locales unixodbc libgss3 odbcinst devscripts debhelper dh-exec dh-autoreconf libreadline-dev libltdl-dev unixodbc-dev wget unzip \
&& rm -rf /var/lib/apt/lists/* \
&& docker-php-ext-install pdo \
&& echo "en_US.UTF-8 UTF-8" > /etc/locale.gen
<?php
namespace AppBundle\Menu;
use Knp\Menu\FactoryInterface;
use Symfony\Component\HttpFoundation\RequestStack;
class MenuBuilder
{
private $factory;
@danielnv18
danielnv18 / AdminForm.php
Created January 4, 2015 21:02
Create a form in drupal 8
<?php
/**
* @file
* Contains Drupal\demo\Form\AdminForm.
*/
namespace Drupal\demo\Form;
use Drupal\Core\Form\ConfigFormBase;
<?php
/**
* @file
* Contains Drupal\demo\Plugin\Block\DemoBlock.
*/
namespace Drupal\demo\Plugin\Block;
use Drupal\Core\Block\BlockBase;
@danielnv18
danielnv18 / download-drush.sh
Created December 31, 2014 20:48
Shell steps for install latest drush version
cd /usr/share
sudo git clone --branch master https://github.com/drush-ops/drush.git
@danielnv18
danielnv18 / example.info.yml
Created December 22, 2014 04:22
Ejemplo de un archivo info en drupal 8
name: El nombre que nuestro modulo va a tener
description: 'la descripción de nuestro modulo'
type: module
core: 8.x