Skip to content

Instantly share code, notes, and snippets.

@AdeilsonESilva
AdeilsonESilva / gist:dbebf37a543b4e0d61ba137f82d20b42
Created July 4, 2024 11:27
Some VSCode Keybindings not working in Ubuntu
Command
gsettings list-recursively | grep Up
Result
org.gnome.desktop.wm.keybindings move-to-workspace-up ['<Control><Shift><Alt>Up']
org.gnome.desktop.wm.keybindings switch-to-workspace-up ['<Control><Alt>Up']
Command
gsettings set org.gnome.desktop.wm.keybindings switch-to-workspace-up "[]"
gsettings set org.gnome.desktop.wm.keybindings switch-to-workspace-down "[]"
@AdeilsonESilva
AdeilsonESilva / vscode-remove-duplicate-lines.md
Created March 22, 2024 13:41 — forked from marcosvpj/vscode-remove-duplicate-lines.md
How to remove duplicate lines in Visual Studio Code?

If the order of lines is not important##

Sort lines alphabetically, if they aren't already, and perform these steps:
(based on this related question: https://stackoverflow.com/q/1573361/3258851)

  1. Control+F

  2. Toggle "Replace mode"

  3. Toggle "Use Regular Expression" (the icon with the .* symbol)

import express from 'express'
const app = express()
const heroService = new HeroService()
app.get('/api/hero', (req, res) => {
return res.status(200).json(heroService.getHeroes())
})
app.get('/api/hero/:id', (req, res) =>{
@AdeilsonESilva
AdeilsonESilva / git_clean.sh
Created November 3, 2023 10:39
delete all files and folder git matching
git ls-files -z | xargs -0 rm -f
git ls-tree --name-only -d -r -z HEAD | sort -rz | xargs -0 rmdir
@AdeilsonESilva
AdeilsonESilva / line_break.dart
Created June 7, 2023 16:53
Break line in flutter
Row(
children: [
Flexible(
child: RichText(
text: TextSpan(
text: 'Occaecat irure incididunt eiusmod laborum esse in. Aliqua ipsum tempor cupidatat consequat pariatur ipsum id sit. Laboris amet quis nostrud labore duis nulla incididunt. Dolore adipisicing duis Lorem non mollit commodo Lorem laborum cupidatat ex adipisicing irure aliquip. Reprehenderit magna labore nisi voluptate dolore Lorem voluptate cillum ut sint dolor labore reprehenderit exercitation.',
children: [
const TextSpan(
text: ' ',
),
@AdeilsonESilva
AdeilsonESilva / mac_keyboard.sh
Created May 8, 2023 13:53
Change mac keyboard identifying
open /System/Library/CoreServices/KeyboardSetupAssistant.app
@AdeilsonESilva
AdeilsonESilva / removeCache.sh
Created April 12, 2023 11:16
clean cache in environment react native
#!/bin/bash
echo "Removing ./node_modules";
rm -rf ./node_modules;
if [[ "$OSTYPE" == "darwin"* ]]; then
echo "Removing ./ios/build";
rm -rf ./ios/build;
echo "Removing ./ios/Pods";
@AdeilsonESilva
AdeilsonESilva / rn-commands.sh
Last active May 24, 2023 17:04
common commands to react native
#!/usr/bin/env bash
# Renders a text based list of options that can be selected by the
# user using up, down and enter keys and returns the chosen option.
#
# Arguments : list of options, maximum of 256
# "opt1" "opt2" ...
# Return value: selected index (0 for opt1, 1 for opt2 ...)
function select_option {
@AdeilsonESilva
AdeilsonESilva / rename.sh
Created June 21, 2022 11:37 — forked from mustafaturan/rename.sh
Rename all js files into jsx
for x in *.js; do mv "$x" "${x%.js}.jsx"; done
@AdeilsonESilva
AdeilsonESilva / mac-m1.txt
Created February 25, 2022 13:13
Setup Mac M1 environment React Native
1º /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
2º brew install chruby ruby-install
3º ruby-install ruby-3.1.0
4º echo "source /opt/homebrew/opt/chruby/share/chruby/chruby.sh" >> ~/.zshrc
echo "source /opt/homebrew/opt/chruby/share/chruby/auto.sh" >> ~/.zshrc
echo "chruby ruby-3.1.0" >> ~/.zshrc
5º brew install node@16
6º brew install watchman
7º Install “Command Line Tools” in software update
8º gem install ffi