Skip to content

Instantly share code, notes, and snippets.

View owalacesilva's full-sized avatar
🏠
Working from home

Walace Silva owalacesilva

🏠
Working from home
View GitHub Profile
@owalacesilva
owalacesilva / Dockerfile
Created February 13, 2024 21:28
Dockerfile to nginx and nestjs application
FROM --platform=linux/amd64 node:20.6.1-alpine3.18 AS base
RUN apk update
RUN apk add --no-cache dumb-init bash wget curl nginx
RUN mkdir -p /workspace
WORKDIR /workspace
FROM base AS dependencies
@owalacesilva
owalacesilva / launch.json
Created February 3, 2024 18:01
Vscode Lauch Nest.js
{
"version": "0.2.0",
"configurations": [
{
"type": "node",
"request": "launch",
"name": "Debug Goflux Product Order",
"runtimeExecutable": "npm",
"envFile": "${workspaceFolder}/.env.development.local",
"runtimeArgs": [
@owalacesilva
owalacesilva / palindrome.rb
Last active June 13, 2023 13:39
Palindrome word
def palindrome?(word)
initial_word = word.downcase.gsub(/[^a-z0-9]/, '')
reversed_word = initial_word.reverse
initial_word == reversed_word
end
puts 'Typing a word:'
input = gets.chomp
if palindrome?(input)
div:hover {
-webkit-box-shadow: rgba(39,44,49,.07) 8px 28px 50px, rgba(39,44,49,.04) 1px 6px 12px;
box-shadow: 8px 28px 50px rgba(39,44,49,.07), 1px 6px 12px rgba(39,44,49,.04);
-webkit-transition: all .4s ease;
transition: all .4s ease;
-webkit-transform: translate3D(0,-1px,0) scale(1.02);
transform: translate3D(0,-1px,0) scale(1.02);
}
<select class="form-control" name="state" ng-model="vm.state">
<option ng-value="null" disabled>&#8212;Select a state&#8212;</option>
<option ng-value="'AC'">Acre</option>
<option ng-value="'AC'">Acre</option>
<option ng-value="'AL'">Alagoas</option>
<option ng-value="'AP'">Amapá</option>
<option ng-value="'AM'">Amazonas</option>
<option ng-value="'BA'">Bahia</option>
<option ng-value="'CE'">Ceará</option>
<option ng-value="'DF'">Distrito Federal</option>
def read_file
## ActionDispatch::Http::UploadedFile
uploaded_file = params[:file]
File.open(uploaded_file.path, "r") do |f|
words = []
f.each_line do |line|
words << line.split
end
words
end