Skip to content

Instantly share code, notes, and snippets.

View nietzscheson's full-sized avatar

Cristian Angulo nietzscheson

View GitHub Profile
import { Injectable, NotFoundException } from '@nestjs/common';
import { InjectRepository } from '@nestjs/typeorm';
import { User } from './user.entity';
import { Repository } from 'typeorm';
import { Args } from '@nestjs/graphql';
import { UsersArgs } from './dto/users.args';
import { ResourceArgs } from '../common/dto/resource.args';
import { UserArgs } from './dto/user.args';
import { AuthArgs } from '../auth/dto/auth.args';
import { Test, TestingModule } from '@nestjs/testing';
import { INestApplication } from '@nestjs/common';
import * as request from 'supertest';
import { AppModule } from '../src/app.module';
import { User } from 'src/user/user.entity';
import { Connection, Repository } from 'typeorm';
import * as faker from 'faker';
describe('User Resolver', () => {
let app: INestApplication;
@nietzscheson
nietzscheson / graphql-curl-commands.txt
Last active April 22, 2020 16:21
GraphQL + Curl commands
# Query
curl -X POST http://localhost:3000/api/graphql -H "Content-Type: application/graphql" -d 'query { customers { edges { node { id } } } }'
# Mutation
curl -X POST -H "Content-Type: application/json" -d '{ "query": "mutation{ login(username: \"emma\" password: \"12345\") { access_token } }" }' http://localhost:3000/graphql | jsonpp
@nietzscheson
nietzscheson / clickwase-shopify.md
Last active September 11, 2019 17:10
ClickWase pixels implementation in Shopify

ClickWase <3 Shopify pixels implementation

Please read the next:

{% if first_time_accessed %}
  {% if checkout.customer.orders.size > 1 %}
 <img src="https://my.pampanetwork.com/scripts/sale.php?TotalCost={{%20order.total_price%20|%20money_without_currency%20}}&amp;AccountId=e692920c&amp;OrderID={{%20order.order_number%20}}&amp;ActionCode=recurrente&amp;CampaignID=14b4775a&amp;Currency=MXN" width="1" height="1">
### docker-compose ps
Name Command State Ports
-----------------------------------------------------------------------------------------------------------
phpmyadmin /run.sh supervisord -n -j ... Up 80/tcp, 9000/tcp
xoppalcom_blackfire_1 blackfire-agent Up 8707/tcp
xoppalcom_db_1 docker-entrypoint.sh mysqld Up 0.0.0.0:3306->3306/tcp, 33060/tcp
xoppalcom_nginx_1 nginx Up 443/tcp, 80/tcp
xoppalcom_php_1 docker-php-entrypoint php-fpm Up 9000/tcp
xoppalcom_traefik_1 /entrypoint.sh -c /dev/nul ... Up 0.0.0.0:80->80/tcp, 0.0.0.0:8080->8080/tcp
@nietzscheson
nietzscheson / docker-compose.yml
Created October 20, 2018 03:58 — forked from agarzon/docker-compose.yml
My docker-compose.yml for development
gitlab:
image: 'gitlab/gitlab-ce:latest'
container_name: gitlab
restart: always
hostname: 'gitlab.mcu.dc'
environment:
GITLAB_OMNIBUS_CONFIG: |
external_url 'http://gitlab.mcu.dc:8090'
gitlab_rails['gitlab_shell_ssh_port'] = 2290
gitlab_rails['smtp_enable'] = true
@nietzscheson
nietzscheson / .gitconfig
Created October 1, 2018 15:47 — forked from pksunkara/config
Sample of git config file (Example .gitconfig)
[user]
name = Pavan Kumar Sunkara
email = pavan.sss1991@gmail.com
username = pksunkara
[core]
editor = vim
whitespace = fix,-indent-with-non-tab,trailing-space,cr-at-eol
excludesfile = ~/.gitignore
[sendemail]
smtpencryption = tls
@nietzscheson
nietzscheson / Remove all git tags
Created September 27, 2018 19:25 — forked from okunishinishi/Remove all git tags
Delete all git remote tags
#Delete local tags.
git tag -l | xargs git tag -d
#Fetch remote tags.
git fetch
#Delete remote tags.
git tag -l | xargs -n 1 git push --delete origin
#Delete local tasg.
git tag -l | xargs git tag -d
@nietzscheson
nietzscheson / docker-compose.yml
Created September 20, 2018 17:58 — forked from MKagesawa/docker-compose.yml
Docker-compose MySQL Image create multiple databases
# The official MySQL (https://hub.docker.com/_/mysql/) supports only one MYSQL_DATABASE environment variable.
# By modifying the entrypoint and passing shell script, you can create multiple dbs without having to make a mysql image just for this purpose.
version: '3'
services:
# Some other service connecting to mysql
db:
image: mysql:5.6
@nietzscheson
nietzscheson / docker-compose.yml
Created August 10, 2018 21:27 — forked from barnybug/docker-compose.yml
Docker compose for a Docker-in-docker gitlab runners setup
# Docker-in-Docker Gitlab runners setup taken from:
# https://medium.com/@tonywooster/docker-in-docker-in-gitlab-runners-220caeb708ca
dind:
restart: always
privileged: true
volumes:
- /var/lib/docker
image: docker:17.09.0-ce-dind
command:
- --storage-driver=overlay2