Skip to content

Instantly share code, notes, and snippets.

View renanfranca's full-sized avatar
😄

Renan Franca renanfranca

😄
View GitHub Profile
@renanfranca
renanfranca / LLM_history.txt
Created September 21, 2024 02:14
Change main_system promopt at aider using thinking tags approach by lucifer
USER Can you help me to change the use of await for .then and .catch at AuthVue.component.ts?
ASSISTANT Certainly! I'll help you modify the `AuthVue.component.ts` file to replace the `await` syntax with `.then()` and `.catch()` chains. Let's go through this process step by step.
ASSISTANT
ASSISTANT <thinking>
ASSISTANT To change the use of `await` to `.then()` and `.catch()`, we need to:
ASSISTANT 1. Identify all the `async` functions in the component.
ASSISTANT 2. Remove the `async` keyword from these functions.
ASSISTANT 3. Replace `await` calls with `.then()` chains.
ASSISTANT 4. Add `.catch()` blocks to handle errors where necessary.
//Starting define the entities
entity BabyProfile {
name String required
picture ImageBlob
birthday ZonedDateTime required
sign String
main Boolean
userId String required
}
entity Weight {
//Define the gateway application
application {
config {
baseName gateway,
applicationType gateway,
packageName com.mamazinha.gateway,
authenticationType jwt,
prodDatabaseType postgresql,
clientFramework angularX,
serviceDiscoveryType eureka,
@renanfranca
renanfranca / latest-blog-post-profile-workflow-every-hour.yml
Last active March 29, 2022 22:17
Automatically show yours latest blog post at your github profile
name: Latest blog post workflow every hour
on:
schedule:
- cron: '0 * * * *'
jobs:
update-readme-with-blog:
name: Update this repo's README with latest blog posts
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
@renanfranca
renanfranca / latest-blog-post-profile-workflow-manual.yml
Last active March 29, 2022 22:17
Automatically show yours latest blog post at your github profile
name: Latest blog post profile workflow manual
on:
workflow_dispatch:
jobs:
update-readme-with-blog:
name: Update this repo's README with latest blog posts
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: gautamkrishnar/blog-post-workflow@master
@renanfranca
renanfranca / LazyLoad.js
Created October 20, 2015 14:34 — forked from neilsoult/LazyLoad.js
LazyLoad directive for loading external javascript for AngularJs. In this example, I use google maps' API as the external library being loaded
angular.module('testApp', []).
directive('lazyLoad', ['$window', '$q', function ($window, $q) {
function load_script() {
var s = document.createElement('script'); // use global document since Angular's $document is weak
s.src = 'https://maps.googleapis.com/maps/api/js?sensor=false&callback=initialize';
document.body.appendChild(s);
}
function lazyLoadApi(key) {
var deferred = $q.defer();
$window.initialize = function () {
<link rel="import" href="../topeka-elements/category-icons.html">
<link rel="import" href="../core-icon/core-icon.html">
<polymer-element name="my-element">
<template>
<style>
:host {
position: absolute;
width: 100%;
<link rel="import" href="../topeka-elements/category-icons.html">
<link rel="import" href="../core-icon/core-icon.html">
<link rel="import" href="../notification-elements/notification-alert.html">
<link rel="import" href="../paper-button/paper-button.html">
<link rel="import" href="../speech-mic/speech-mic.html">
<link rel="import" href="../topeka-elements/theme.html">
<link rel="import" href="../topeka-elements/topeka-resources.html">
<link rel="import" href="../topeka-elements/topeka-app.html">
<link rel="import" href="../topeka-elements/avatars.html">