Skip to content

Instantly share code, notes, and snippets.

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

Vitor Silva mvvitorsilvati

🏠
Working from home
  • AIX SISTEMAS
  • Rio Verde/GO
View GitHub Profile
@lpirola
lpirola / lista-de-nacionalidade.txt
Created November 4, 2013 22:12
Lista de países em português com suas respectivas nacionalidades
Antígua e Barbuda - Antiguano
Argentina - Argentino
Bahamas - Bahamense
Barbados - Barbadiano, barbadense
Belize - Belizenho
Bolívia - Boliviano
Brasil - Brasileiro
Chile - Chileno
Colômbia - Colombiano
Costa Rica - Costarriquenho
@brunofonseca
brunofonseca / deploy.php
Created January 1, 2016 15:57
Arquivo de Configuração deploy
<?php
require 'recipe/symfony.php';
server('NOME_SERVIDOR', 'IP_SERVIDOR', PORTA_SSH)
->user('USUARIO')
->forwardAgent()
->stage('PRODUCTION_DEVELOPMENT_TESTE')
->env('deploy_path', 'caminho');
@kumarharsh
kumarharsh / Select.jsx
Last active October 7, 2022 21:02
Shows how to use react-select with portals provided by react-overlay
import ReactSelect from 'react-select';
import Portal from 'react-overlays/lib/Portal';
import 'react-select/dist/react-select.css'; // I'm using css-modules, but you can use whatever you like
import css from './Select.css';
import defaultMenuRenderer from 'react-select/lib/utils/defaultMenuRenderer'; // this renders the actual menu - we can reuse the same component
class _SelectMenu extends React.Component {
props: { // flow types
selectProps: {},

MySQL Cheat Sheet

Help with SQL commands to interact with a MySQL database

MySQL Locations

  • Mac /usr/local/mysql/bin
  • Windows /Program Files/MySQL/MySQL version/bin
  • Xampp /xampp/mysql/bin

Add mysql to your PATH

@djfdyuruiry
djfdyuruiry / README.md
Last active April 28, 2024 08:34
WSL 2 - Enabling systemd

Enable systemd in WSL 2

NOTE: If you have Windows 11 there is now an official way to do this in WSL 2, use it if possible - see MS post here (WINDOWS 11 ONLY)

This guide will enable systemd to run as normal under WSL 2. This will enable services like microk8s, docker and many more to just work during a WSL session. Note: this was tested on Windows 10 Build 2004, running Ubuntu 20.04 LTS in WSL 2.

  • To enable systemd under WSL we require a tool called systemd-genie

  • Copy the contents of install-sg.sh to a new file /tmp/install-sg.sh:

@marcodotcastro
marcodotcastro / v23.0: Como melhorar o terminal?.md
Last active April 23, 2023 20:37
v23.0: Como melhorar o terminal?

Zsh

Instalação

sudo apt install zsh

Plugins

Oh My Zsh

https://github.com/ohmyzsh/ohmyzsh
# Create a temporary directory if it doesn't exist
$tempDirectory = "C:\Temp"
if (-not (Test-Path $tempDirectory -PathType Container)) {
New-Item -ItemType Directory -Path $tempDirectory -Force
}
# Step 0: Backup Arc:
Write-Host "Backing up arc..."
& "C:\Program Files\7-Zip\7z.exe" a -t7z "c:\Temp\arcBackup.7z" "c:\arcBrowser\*" -mx=4