Write a markdown tutorial with code examples to get started with OpenAI’s completion API in a modern symfony 5 web application with full static typing. The main example is about having GPT-3 generate a markdown tutorial.
This file contains 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
// SPDX-License-Identifier: MIT | |
pragma solidity ^0.8.3; | |
import "@openzeppelin/contracts/utils/Counters.sol"; | |
import "@openzeppelin/contracts/token/ERC721/extensions/ERC721URIStorage.sol"; | |
import "@openzeppelin/contracts/token/ERC721/ERC721.sol"; | |
import "hardhat/console.sol"; |
This file contains 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
{% macro collection_item(form) %} | |
<div data-form-collection-target="field"> | |
{{ form_widget(form) }} | |
<button type="button" | |
data-action="form-collection#removeItem"> | |
remove | |
</button> | |
</div> | |
{% endmacro %} |
A curated list of AWS resources to prepare for the AWS Certifications
A curated list of awesome AWS resources you need to prepare for the all 5 AWS Certifications. This gist will include: open source repos, blogs & blogposts, ebooks, PDF, whitepapers, video courses, free lecture, slides, sample test and many other resources.
OP: @leonardofed founder @ plainflow.
This file contains 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
<?php | |
/* | |
* The timezone in these datetimes look the same but they are in fact represent different UTC offsets. | |
* The 1st one maps to UTC+01 (BST) while the 2nd one maps to a UTC+00 (GMT). | |
* This is because daylight saving time (DST) aka. clocks going forward/backward happen on different days in different years. | |
*/ | |
$now = new DateTime('2018-03-26T08:00:00', new DateTimeZone('Europe/London')); | |
$inAYear = new DateTime('2019-03-26T08:00:00', new DateTimeZone('Europe/London')); |
This file contains 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
$message = \Swift_Message::newInstance() | |
->setSubject('Hello Email') | |
->setFrom('[email protected]') | |
->setTo('[email protected]') | |
->setBody('You should see me from the profiler!') | |
; | |
$this->get('mailer')->send($message); |
This file contains 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
--- PSQL queries which also duplicated from https://github.com/anvk/AwesomePSQLList/blob/master/README.md | |
--- some of them taken from https://www.slideshare.net/alexeylesovsky/deep-dive-into-postgresql-statistics-54594192 | |
-- I'm not an expert in PSQL. Just a developer who is trying to accumulate useful stat queries which could potentially explain problems in your Postgres DB. | |
------------ | |
-- Basics -- | |
------------ | |
-- Get indexes of tables |
This file contains 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
#!/bin/bash | |
if [[ "$1" != "" ]]; then | |
S3BUCKETNAME="$1" | |
else | |
echo ERROR: Failed to supply S3 bucket name | |
exit 1 | |
fi | |
aws s3 sync build s3://$S3BUCKETNAME --delete --cache-control max-age=31536000,public |
This file contains 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
#!groovy | |
import groovy.json.JsonOutput | |
import groovy.json.JsonSlurper | |
def label = "mypod-${UUID.randomUUID().toString()}" | |
podTemplate(label: label, yaml: """ | |
spec: | |
containers: | |
- name: mvn | |
image: maven:3.3.9-jdk-8 |
This file contains 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
exports.handler = function(event, context) { | |
// We'd get this from the Lambda event in reality | |
var sampleInput = { | |
from: 1, | |
to: 39, | |
bucketName: 'test-bucket', | |
imageSizes: [{ | |
width: 600, | |
height: 400, | |
description: 'A medium thumbnail', |
NewerOlder