Skip to content

Instantly share code, notes, and snippets.

View sergiosouzalima's full-sized avatar

Sergio Lima sergiosouzalima

View GitHub Profile
@sergiosouzalima
sergiosouzalima / nim_result.nim
Last active November 30, 2022 12:18
result é uma variável declarada implicitamente
# result é uma variável
# declarada implicitamente
proc dizOla(nome: string): string =
result = "Olá, "
if nome == "":
result = "Qual é seu nome mesmo?"
else:
result &= nome
## Program name........: wttrin_weather_lib2.nim
## Program description.: Testing Nim library that fetches weather from wttr.in
## Author..............: Sergio Lima
## Created on..........: Jul, 10 2022
## Install lib
## $ nimble install wttrin -y
## How to compile
## $ nim c -d:ssl wttrin_weather_lib2.nim
## How to run
## $ ./wttrin_weather_lib2
## Program name........: wttrin_weather_lib.nim
## Program description.: Testing Nim library that fetches weather from wttr.in
## Author..............: Sergio Lima
## Created on..........: Jul, 9 2022
## Install lib
## $ nimble install wttrin -y
## How to compile
## $ nim c -d:ssl wttrin_weather_lib.nim
## How to run
## $ ./wttrin_weather_lib
@sergiosouzalima
sergiosouzalima / ultragen_test.ultra
Last active January 13, 2022 00:17
Ultragen first test
###
$ ultragen test.ultra
***
Current Timezone date is:
2022-01-12
*** end
@sergiosouzalima
sergiosouzalima / listener.ora
Created May 19, 2020 18:09
/u01/app/oracle/product/19.0.0/dbhome_1/network/admin/listener.ora
$ cat /u01/app/oracle/product/19.0.0/dbhome_1/network/admin/listener.ora
# listener.ora Network Configuration File: /u01/app/oracle/product/19.0.0/dbhome_1/network/admin/listener.ora
# Generated by Oracle configuration tools.
LISTENER =
(DESCRIPTION_LIST =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = localhost)(PORT = 1521))
(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1521))
(ADDRESS = (PROTOCOL = tcps)(HOST = ol7-dba.localdomain)(PORT = 5500))
@sergiosouzalima
sergiosouzalima / listener.ora
Created May 19, 2020 18:09
/u01/app/oracle/product/19.0.0/dbhome_1/network/admin/listener.ora
$ cat /u01/app/oracle/product/19.0.0/dbhome_1/network/admin/listener.ora
# listener.ora Network Configuration File: /u01/app/oracle/product/19.0.0/dbhome_1/network/admin/listener.ora
# Generated by Oracle configuration tools.
LISTENER =
(DESCRIPTION_LIST =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = localhost)(PORT = 1521))
(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1521))
(ADDRESS = (PROTOCOL = tcps)(HOST = ol7-dba.localdomain)(PORT = 5500))
@sergiosouzalima
sergiosouzalima / Enterprise_Manager_not_working
Created May 19, 2020 14:21
Enterprise_Manager_not_working
$ ps -ef | grep smon
oracle 3351 1 0 10:10 ? 00:00:00 ora_smon_orcl
oracle 6336 1855 0 11:03 pts/0 00:00:00 grep --color=auto smon
[oracle@ol7-dba ~]$ lsnrctl status
LSNRCTL for Linux: Version 19.0.0.0.0 - Production on 19-MAY-2020 11:08:15
Copyright (c) 1991, 2019, Oracle. All rights reserved.
@sergiosouzalima
sergiosouzalima / smon_not_working
Created May 18, 2020 15:17
Oracle install issues
[oracle@ol7-dba oracle]$ ps -ef | grep smon
oracle 3457 2214 0 12:10 pts/0 00:00:00 grep --color=auto smon
[oracle@ol7-dba oracle]$ lsnrctl status
LSNRCTL for Linux: Version 19.0.0.0.0 - Production on 18-MAY-2020 12:10:38
Copyright (c) 1991, 2019, Oracle. All rights reserved.
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=localhost)(PORT=1521)))
STATUS of the LISTENER
@sergiosouzalima
sergiosouzalima / mailchimp.rb
Created April 11, 2016 20:43
Refactoring: Usando o design pattern Extract Method de Martin Fowler (http://www.refactoring.com/catalog/extractMethod.html)
module Emailservices
module Adapters
class Mailchimp
def self.subscribe! config={}, parameters={}
new(config, parameters).subscribe!
end
def initialize config={}, parameters={}
@config = config
def flag_name¬
flag || 'default'
end
def flag_name
flag || 'default'
end