Skip to content

Instantly share code, notes, and snippets.

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

Glauco Roberto Munsberg glaucomunsberg

🏠
Working from home
View GitHub Profile
@glaucomunsberg
glaucomunsberg / samba.service
Created November 28, 2023 17:03
Ubuntu Samba config as Mac Time Machine
<!--
$ mv samba.service /etc/avahi/services/samba.service
$ sudo service smbd reload
-->
<?xml version="1.0" standalone='no'?>
<!DOCTYPE service-group SYSTEM "avahi-service.dtd">
<service-group>
<name replace-wildcards="yes">%h</name>
<service>
<type>_smb._tcp</type>
@glaucomunsberg
glaucomunsberg / App.tsx
Created November 28, 2023 16:52
react-intl with yml file with typescript
// yarn add js-yaml react-intl @types/js-yaml
import yaml from 'js-yaml';
import { IntlProvider } from 'react-intl';
import { useEffect, useState } from 'react';
import Routes from './Routes';
const loadYaml = async (filePath:string) => {
try {
const response = await fetch(filePath);
const yamlContent = await response.text();
@glaucomunsberg
glaucomunsberg / .bash_profile
Created November 28, 2023 16:37
bash_profile with alias to docker compose commands
# past content bellow and and reload source
# $ nano ~/.bash_profile
# $ source ~/.bash_profile
# Command '$ dcu container_name' alias to '$ docker compose up -d container_name'
# Command '$ dcs container_name' alias to '$ docker compose stop container_name'
execute_dcs() {
if [ -z "$1" ]; then
echo "Usage: dcs <container_name>"
return 1