This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { ChatCompletionTool } from 'openai/src/resources/chat/completions'; | |
import { | |
FunctionDeclarationSchemaType, | |
FunctionDeclarationsTool, | |
} from '@google/generative-ai'; | |
const openAiTools: ChatCompletionTool[] = [ | |
{ | |
type: 'function', | |
function: { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function htmlEntitiesDecode(input) { | |
entities.forEach(function(substitution) { | |
var regex = new RegExp(substitution.entity, 'g'); | |
input = input.replace(regex, substitution.character); | |
}); | |
return input; | |
} | |
const entities = [ | |
{ entity: "À", character: "À" }, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
'use strict'; | |
const { Command } = require('@adonisjs/ace'); | |
const Seeder = require('../../database/seeds/Seeder'); | |
const ace = require('@adonisjs/ace'); | |
class MigrationFresh extends Command { | |
/** | |
* Command signature | |
*/ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
'use strict'; | |
const { Command } = require('@adonisjs/ace'); | |
const Seeder = require('../../database/seeds/Seeder'); | |
const ace = require('@adonisjs/ace'); | |
class MigrationFresh extends Command { | |
/** | |
* Command signature | |
*/ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
version: '3.3' | |
services: | |
db: | |
image: mysql:5.7 | |
volumes: | |
- db:/var/lib/mysql | |
restart: always | |
environment: | |
MYSQL_ROOT_PASSWORD: wordpress |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
## Google cloud config | |
PROJECT="node-docker-gcp" | |
ZONE="us-central1-a" | |
## Instance settings | |
INSTANCE_NAME="my-compute-instance" | |
### Instance creation settings |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
echo -e "\nDeploy remote instance" | |
echo -e "\n# 1/4 - Loading and setting options..." | |
## Show commands (if you want to check, uncomment it) | |
#set -x | |
## Stop on errors | |
set -e |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
echo -e "\nSetup remote instance" | |
echo -e "\n# 1/3 - Loading and setting options..." | |
## Show commands (if you want to check, uncomment it) | |
#set -x | |
## Stop on errors | |
set -e |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
## Show commands (if you want to check, uncomment it) | |
##set -x | |
## Stop on errors | |
set -e | |
## Include config | |
source config.sh |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM node:10-alpine | |
WORKDIR /home/node/app | |
COPY package*.json ./ | |
RUN npm install | |
COPY . . | |
EXPOSE 8080 | |
CMD [ "node", "index.js" ] |
NewerOlder