Skip to content

Instantly share code, notes, and snippets.

@gp187
gp187 / j.ts
Last active March 22, 2024 14:06
PO formatting
const x = {
salesOrders: {
description: `sales orders ...`,
data: [
{
date: '2014-09-21',
totalWithTax: 23,
totalTax: 23,
totalShipping: 12
}
@gp187
gp187 / README.md
Created April 18, 2023 02:00
ChatGPT plugin
  1. Instal NestJS
  2. Create new controller using the sample
  3. Add the 2 files in to the root
  4. Use ngrok to port forward to https
  5. Install plugin
@gp187
gp187 / plug
Created January 26, 2023 17:18
plug
class OpenAiBobPlugin {
public foo() {
return 'bar';
}
public init(): string {
return 'initi'
}
@gp187
gp187 / site.conf
Created August 21, 2020 12:52
Nginx website with Ghost blog in a subdirectory sharing a single SSL
server {
root /var/www/html;
index index.html index.htm index.nginx-debian.html;
server_name domain.tld www.domain.tld;
location ~ \.php$ {
include snippets/fastcgi-php.conf;
fastcgi_pass unix:/var/run/php/php7.2-fpm.sock;
{
"type": "fulltext-index",
"name": "idx_listContactsSearch",
"uuid": "2394267d30241ef1",
"sourceType": "couchbase",
"sourceName": "contacts",
"sourceUUID": "b6f199faacce42c00290423d23f1e9a2",
"planParams": {
"maxPartitionsPerPIndex": 171,
"indexPartitions": 6
@gp187
gp187 / Dockerfile
Last active April 16, 2020 15:35
pipeline.yaml
FROM node:12.15.0
LABEL maintainer="Naologic <contact@naologic.com>"
# Make the dir
RUN mkdir -p /var/nao
RUN mkdir -p /etc/pm2-web
WORKDIR /var/nao
# Bundle APP files
COPY dist dist/
@gp187
gp187 / matomo.conf
Created July 8, 2019 08:58
nginx conf for matomo
upstream php-handler {
server app:9000;
}
server {
listen 80;
add_header Referrer-Policy origin; # make sure outgoing links don't show the URL to the Matomo instance
root /var/www/html; # replace with path to your matomo instance
index index.php;
#!/usr/bin/env bash
# names of latest versions of each package
export NGINX_VERSION=1.15.5
export VERSION_NGINX=nginx-$NGINX_VERSION
export VERSION_LIBRESSL=libressl-2.8.1
export VERSION_PCRE=pcre-8.42
#export NPS_VERSION=1.9.32.10
#export VERSION_PAGESPEED=v${NPS_VERSION}-beta
@gp187
gp187 / calendar.component.html
Created September 5, 2018 13:49 — forked from bentedder/calendar.component.html
calendar component angular 4
<div class="calendar">
<div class="calendar-navs">
<div class="month-nav">
<button (click)="prevMonth()">&lt;</button>
<span class="p4">{{ currentDate.format('MMMM') }}</span>
<button (click)="nextMonth()">&gt;</button>
</div>
<div class="year-nav">
<button (click)="prevYear()">&lt;</button>
<span>{{ currentDate.format('YYYY') }}</span>
@gp187
gp187 / nginx.conf
Created September 2, 2018 12:35 — forked from Stanback/nginx.conf
Example Nginx configuration for adding cross-origin resource sharing (CORS) support to reverse proxied APIs
#
# CORS header support
#
# One way to use this is by placing it into a file called "cors_support"
# under your Nginx configuration directory and placing the following
# statement inside your **location** block(s):
#
# include cors_support;
#
# As of Nginx 1.7.5, add_header supports an "always" parameter which