Skip to content

Instantly share code, notes, and snippets.

View ythalorossy's full-sized avatar
🇧🇷
Focusing

Ythalo Saldanha ythalorossy

🇧🇷
Focusing
View GitHub Profile
@ythalorossy
ythalorossy / Dell XPS 15 9560 Manjaro Setup instructions
Created December 27, 2020 11:30 — forked from ajvb/Dell XPS 15 9560 Manjaro Setup instructions
Small, quick guide to set up Manjaro on the XPS 15 9560
# 1. First of all of course get Manjaro:
https://manjaro.org/get-manjaro/
# I recommend using Etcher to copy the image to your USB:
https://etcher.io/
# 2. Before installing make sure:
# - Secure boot is disabled in BIOS
# - Your SSD, HDD or NVME drive is set to AHCI instead of RAID
# - Fastboot should be on Auto or minimal, but this shouldn't matter to much
SELECT
SYSDATE,
TRUNC (SYSDATE) as truncated, -- truncate to 12:00AM
TRUNC (SYSDATE) + 17/24 as t_5PM, -- 5PM
SYSDATE + (60 * 5) / 1440 AS t_5h, -- Plus 5 hours in the current time
NEXT_DAY(TRUNC(SYSDATE),'FRIDAY') "NEXT DAY" -- Next friday 12AM
FROM DUAL;
@ythalorossy
ythalorossy / abstract_factory_pattern_typescript
Created March 2, 2018 04:20
Abstract Factory Pattern in Typescript
abstract class Alert {
abstract show = (): string => "";
}
class AlertIOS extends Alert {
show = (): string => "[Alert IOS]";
}
class AlertLinux extends Alert {
show = (): string => "[Alert Linux]";
}
@ythalorossy
ythalorossy / decorator_pattern_typescript
Created March 1, 2018 04:51
Decorator Pattern in Typescript
abstract class Beverega {
abstract cost(): Number;
}
abstract class AddonDecorator extends Beverega {
public abstract cost(): Number;
}
class Expresso extends Beverega {
public cost(): Number {
@ythalorossy
ythalorossy / observer_pattern_typescript
Created February 27, 2018 04:15
Observer Pattern in Typescript
interface IObserver {
update(): void;
}
interface IObservable {
add(observer: IObserver): void;
remove(Obsever: IObserver): void;
notify(): void;
}
@ythalorossy
ythalorossy / enviroment_variables_linux
Created January 27, 2017 00:21
How to configure enviroment variables in linux
To change the environmental variable "permanently" you'll need to consider at least these situations:
Login/Non-login shell
Interactive/Non-interactive shell
bash
Bash as login shell will load /etc/profile, ~/.bash_profile, ~/.bash_login, ~/.profile in the order
Bash as non-login interactive shell will load ~/.bashrc
Bash as non-login non-interactive shell will load the configuration specified in environment variable $BASH_ENV
$EDITOR ~/.bashrc
@ythalorossy
ythalorossy / .bashrc
Last active January 27, 2017 00:18
My personal .bashrc
# ~/.bashrc: executed by bash(1) for non-login shells.
# see /usr/share/doc/bash/examples/startup-files (in the package bash-doc)
# for examples
# If not running interactively, don't do anything
case $- in
*i*) ;;
*) return;;
esac