Skip to content

Instantly share code, notes, and snippets.

View guiliredu's full-sized avatar
🚀
Working

Guilherme Dias Redü guiliredu

🚀
Working
View GitHub Profile
@guiliredu
guiliredu / vue-3-composition-api-example.vue
Created June 11, 2024 23:59
Vue 3 Composition API example
<template>
<div
@click="$emit('created')"
>
</div>
</template>
<script setup>
// Imports from VUE
import { onMounted, ref, defineProps, defineEmits, computed } from 'vue';

progrium/bashstyle

Bash is the JavaScript of systems programming. Although in some cases it's better to use a systems language like C or Go, Bash is an ideal systems language for smaller POSIX-oriented or command line tasks. Here's three quick reasons why:

  • It's everywhere. Like JavaScript for the web, Bash is already there ready for systems programming.
  • It's neutral. Unlike Ruby, Python, JavaScript, or PHP, Bash offends equally across all communities. ;)
  • It's made to be glue. Write complex parts in C or Go (or whatever!), and glue them together with Bash.

This document is how I write Bash and how I'd like collaborators to write Bash with me in my open source projects. It's based on a lot of experience and time collecting best practices. Most of them come from these two articles, but here integrated, slightly modified, and focusing on the most bang for buck items. Plus some ne

@guiliredu
guiliredu / update-git.sh
Created October 4, 2021 23:03 — forked from YuMS/update-git.sh
Update git to latest version on Ubuntu
#!/bin/bash
sudo add-apt-repository -y ppa:git-core/ppa
sudo apt-get update
sudo apt-get install git -y
@guiliredu
guiliredu / 0_NestJS-Cheatsheet.md
Last active November 13, 2024 19:51
Nest.js Cheatsheet

Nest.js Cheatsheet

Nest CLI

  • npm i -g @nestjs/cli

Packages

  • yarn add class-validator class-transformer
  • yarn add @nestjs/mapped-types
@guiliredu
guiliredu / Express.md
Last active March 13, 2020 21:09
Express - Node Backend Studies

Express.js

Installing

$ npm install express --save

Hello World

// index.js
@guiliredu
guiliredu / apache-template
Created September 25, 2019 19:16 — forked from lavoiesl/apache-template
Apache VirtualHost Template with variable replacement
<VirtualHost *:80>
ServerAdmin {USER}@cslavoie.com
ServerName {DOMAIN}
ServerAlias www.{DOMAIN}
ServerAlias {USER}.localhost
ServerAlias {USER}.static.cslavoie.com
DocumentRoot {DOC_ROOT}
<Directory {DOC_ROOT}>
@guiliredu
guiliredu / 1-input-recaptcha.blade.php
Created June 27, 2019 23:34
Laravel recaptcha blade component
<div class="input-captcha">
<div class="g-recaptcha" data-sitekey="{{ config('app.recaptcha_key') }}"></div>
</div>
@push('scripts')
<script src='https://www.google.com/recaptcha/api.js'></script>
@endpush
@guiliredu
guiliredu / CSS-2019.md
Created June 7, 2019 20:00
CSS 2019 Studies
@guiliredu
guiliredu / .editorconfig
Created March 7, 2019 23:25
Editorconfig for PHP PSR-4
# EditorConfig is awesome: http://EditorConfig.org
# top-most EditorConfig file
root = true
# All PHP files MUST use the Unix LF (linefeed) line ending.
# Code MUST use an indent of 4 spaces, and MUST NOT use tabs for indenting.
# All PHP files MUST end with a single blank line.
# There MUST NOT be trailing whitespace at the end of non-blank lines.
[*]