Skip to content

Instantly share code, notes, and snippets.

View lgzarturo's full-sized avatar
🥷
Trabajando con React, SpringBoot y Marketing Digital

lgzarturo lgzarturo

🥷
Trabajando con React, SpringBoot y Marketing Digital
View GitHub Profile
@lgzarturo
lgzarturo / one-to-many-relationship-with-jpa
Last active February 24, 2024 19:24
Relación OneToMany para obtener la lista de elementos de la relación con JPA o EntityManager
// Clase Usuario
@Entity
@Table(name = "usuarios")
public class Usuario {
@Id
@GeneratedValue(strategy = GenerationType.IDENTITY)
private Long id;

Keybase proof

I hereby claim:

  • I am lgzarturo on github.
  • I am lgzarturo (https://keybase.io/lgzarturo) on keybase.
  • I have a public key ASD1WXe4pOppjFbIVrRmQ8_whlBVSdWp0vylzPjnc60xrAo

To claim this, I am signing this object:

using System.Net;
using System.IO;
namespace Example
{
class Program
{
public static void functionOne() {
var client = new RestClient("https://api.twilio.com/json/send");
client.Authenticator = new SimpleAuthenticator("username", "myusername", "password", "mypassword");
#!/usr/bin/env python
#_*_ coding:utf-8 _*_
import requests
import argparse
parser = argparse.ArgumentParser(description='Data:')
parser.add_argument('-u', '--url', help='url', required=True)
parser = parser.parse_args()
dict_headers = {}
python3 -m venv ./venv
source venv/bin/activate
pip3 install -r requirements.txt
docker run -itd --rm --name django_api \
--workdir /home --user $(id -u):$(id -g) \
--mount type=bind,source="$(pwd)/api",target=/home/api \
python:3.9
#!/usr/bin/env python
from pathlib import Path
from watchdog.events import FileSystemEventHandler
from watchdog.observers import Observer
import time
import os
import uuid
import colorama
import requests
import time
from console_progressbar import ProgressBar
from urllib.parse import urlparse, urljoin
from bs4 import BeautifulSoup
url = "https://arthurolg.com"
colorama.init()
GREEN = colorama.Fore.GREEN
import json
from googleapiclient.discovery import build
from google.oauth2.service_account import Credentials
def get_service_using_client_id(api_name, api_version, scopes, key_file_location):
credentials = Credentials.from_service_account_info(key_file_location, scopes=scopes)
service = build(api_name, api_version, credentials=credentials)
return service
<style>
body {
background: #333;
font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
font-size: 14px;
line-height: 20px;
color: #333333;
margin: 0;
padding: 0;
}
User-agent: *
Allow: */*?
User-agent: Googlebot-Image
Allow: */*.jpg*
Allow: */*.png*
Sitemap: {URL}