Skip to content

Instantly share code, notes, and snippets.

View TristanOrta's full-sized avatar

Oscar Tristan Orta TristanOrta

  • Productora Nacional de Papel
  • San Luis Potosi
View GitHub Profile
@TristanOrta
TristanOrta / LoginModuleTest.php
Created March 25, 2021 23:40
this is an example of a php unit test for the login of your application
<?php
namespace Tests\Feature;
use Illuminate\Foundation\Testing\RefreshDatabase;
use Illuminate\Foundation\Testing\WithFaker;
use Tests\TestCase;
use App\User;
use Illuminate\Support\Facades\DB;
@TristanOrta
TristanOrta / RegisterModuleTest.php
Created March 25, 2021 23:46
code for a test in the registration module with phpUnit
<?php
namespace Tests\Feature;
use Illuminate\Foundation\Testing\RefreshDatabase;
use Illuminate\Foundation\Testing\WithFaker;
use Tests\TestCase;
use App\User;
use Illuminate\Foundation\Testing\WithoutMiddleware;
@TristanOrta
TristanOrta / error loader.js:883 in node.js
Created April 1, 2021 00:13
Error in node.js internal/modules/cjs/loader.js:883
internal/modules/cjs/loader.js:883
throw err;
^
Error: Cannot find module 'C:\Users\oscar\Desktop\node\03- bases node\helpers\app.js'
at Function.Module._resolveFilename (internal/modules/cjs/loader.js:880:15)
at Function.Module._load (internal/modules/cjs/loader.js:725:27)
at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:72:12)
at internal/main/run_main_module.js:17:47 {
code: 'MODULE_NOT_FOUND',
@TristanOrta
TristanOrta / Read_powerbuilder_com_port
Last active June 25, 2022 15:04
Connection and reading of serial port to PowerBuilder
//if the port is open it closes
if ol_mscomm.object.PortOpen then
ol_mscomm.object.PortOpen = false
end if
//port reading process
try
ol_mscomm.object.CommPort = as_puerto
ol_mscomm.object.Settings = as_config_puerto
ol_mscomm.object.Handshaking= 0
@TristanOrta
TristanOrta / weight capture, serial port to powerbuilder
Last active June 28, 2022 22:14
weight capture of a scale through serial COM port to powerbuilder
//this module corresponds to an OleCustomControl object of powerbuilder, the read COM port function is called, which is also among my GIST
String ls_car
integer peso
// the object is read until a 6-digit result is obtained if the ascci character 10 is detected
if MSCOMM_LEER_PESO_LO.object.CommEvent = 2 then
ls_car = MSCOMM_LEER_PESO_LO.object.Input
if Asc(ls_car) = 13 then Return
@TristanOrta
TristanOrta / resources.md
Created June 28, 2022 22:37 — forked from x0nu11byt3/resources.md
A curated list of Assembly Language / Reversing / Malware Analysis -resources

Assembly Language / Reversing / Malware Analysis -resources

Twitter: Muffin

⭐Assembly Language

@TristanOrta
TristanOrta / oracle 9i - powerbuilder not recognize the Oracle TNSNames.md
Last active December 15, 2023 19:38
Installation of Powerbuilder with Oracle 9i / Instalación de powerbuilder con oracle 9i

Installation of PowerBuilder with Oracle 9i

These instructions are meant to address the error generated by PowerBuilder when used with Oracle 9i, which does not recognize the Oracle TNSNames when creating a data profile. This bug is fixed in Oracle 11.

  1. Install the Oracle 9i client:

    • Begin by installing the Oracle 9i client in the usual manner.
  2. Run PowerBuilder Installer:

    • Run the PowerBuilder installer and follow the provided instructions.
@TristanOrta
TristanOrta / PBNI smtp powerbuilder
Last active July 1, 2022 03:37
Implementation of pbni smtp for sending emails with Powerbuilder /implementacion de pbni smtp para envio de correos con powerbuilder
// call the function "f_envia_smtp_pbni" with the following parameters
string ls_recipient = 'Oscar Tristan <oscar_tristan_13@hotmail.com>'
string ls_subject = 'This is a message sent from PBNI'
string ls_message = 'Hello, I sent this message from PB'
string ls_attach = 'My file path'
f_envia_smtp_pbni(ls_recipient,ls_subject,ls_message,ls_attach)
@TristanOrta
TristanOrta / Sobre_Gist.md
Created October 13, 2022 12:26 — forked from renatojobal/Sobre_Gist.md
¿Qué es un gist en GitHub?

¿Qué es un Gist en GitHub y para qué sirve?

Un gist es una forma que se tiene para poder compartir código usando GitHub.

Cuando tenemos un código que no es lo suficientemente grande para crear un repositorio, entonces creamos un gist. Aunque gist funciona básicamente cómo un repositorio, ya que se le puede hacer un fork o clonarlo. Así mismo se puede editar y las personas pueden comentar el gist.

Usos del gist

Muchas personas usan gist cómo un portapapeles. Para subir código que siempre sueles usar en diferentes proyectos. También se suele usar cómo una forma de hacer posts. Cómo este que estas viendo.

@TristanOrta
TristanOrta / ConexionORacle.cs
Created May 17, 2023 16:10
This is an example of a C# connection to an Oracle database.
// This class receives as parameters a sql query and a field which brings us the result of the query and saves it in a string
//
using Oracle.ManagedDataAccess.Client;
using System;
using System.Collections.Generic;
using System.Text;
namespace ssh_CShP
{