Skip to content

Instantly share code, notes, and snippets.

View carloschneider's full-sized avatar
:octocat:
.

Carlo Schneider carloschneider

:octocat:
.
View GitHub Profile
@carloschneider
carloschneider / Editor.vue
Created April 27, 2024 20:27 — forked from andreasvirkus/Editor.vue
Tiptap emoji plugin for Klausapp
<template>
<div ref="editor" class="notranslate">
<div v-show="showSuggestions" ref="suggestions">
<template v-if="(filteredSuggestions || []).length">
<div
v-for="(item, index) in filteredSuggestions.slice(0, 10)"
:key="index"
:class="[$style.suggestion, navigatedSuggestionIndex === index && $style.selected]"
@click="selectSuggestion(item)"
>
@carloschneider
carloschneider / keychron_linux.md
Created April 21, 2023 14:47 — forked from andrebrait/keychron_linux.md
Keychron keyboards on Linux + Bluetooth fixes

Here is the best setup (I think so :D) for K-series Keychron keyboards on Linux.

Most of these commands have been tested on Ubuntu 20.04 and should also work on most Debian-based distributions. If a command happens not to work for you, take a look in the comment section.

Make Fn + F-keys work

Keychron Keyboards on Linux use the hid_apple driver (even in Windows/Android mode), both in Bluetooth and Wired modes. By default, this driver uses the F-keys as multimedia shortcuts and you have to press Fn + the key to get the usual F1 through F12 keys.

@carloschneider
carloschneider / Install_robo3t_Ubuntu.md
Last active February 22, 2020 17:48 — forked from abdallahokasha/Install_robo3t_Ubuntu.md
Install Robo3t on Ubuntu18.04 and make a desktop icon for it

Install Robo3t On Ubuntu 18.04

Download the package form Robo3t or using wget
wget https://download.robomongo.org/1.2.1/linux/robo3t-1.2.1-linux-x86_64-3e50a65.tar.gz
Extract here using

tar -xvzf robo3t-1.2.1-linux-x86_64-3e50a65.tar.gz

@carloschneider
carloschneider / cloudSettings
Last active November 16, 2021 14:45
Visual Studio Code Settings Sync Gist
{"lastUpload":"2021-11-16T14:45:19.999Z","extensionVersion":"v3.4.3"}
{
"above": "The {{field}} should be above {{argument.0}}.",
"accepted": "The {{field}} should have been accepted",
"after": "The {{field}} should be a date after {{argument.0}}",
"after_offset_of": "The {{field}} should be after {{argument.0}} {{argument.1}} from today’s date",
"alpha": "The {{field}} should contain letters only",
"alpha_numeric": "The {{field}} should contain letters and numbers only",
"array": "The {{field}} should be an ARRAY.",
"before": "The {{field}} should be a date before {{argument.0}}.",
"before_offset_of": "The {{field}} should be before {{argument.0}} {{argument.1}} from today’s date",
@carloschneider
carloschneider / README.md
Created December 30, 2019 19:39 — forked from diego3g/README.md
Criação de servidor Node.js

Configuração do servidor

  1. Configurar chave SSH
  2. Criar Droplet
  3. Realizar update e upgrade
  4. Crua usuário adduser deploy e usermod -aG sudo deploy
  5. Cria pasta .ssh pro deploy
  6. cp ~/.ssh/authorized_keys /home/deploy/.ssh/authorized_keys
  7. chown -R deploy:deploy .ssh/
  8. chmod 700 .ssh
server {
server_name testdeploy.rocketseat.com.br;
location / {
proxy_pass http://127.0.0.1:3333;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection 'upgrade';
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
@carloschneider
carloschneider / .zshrc
Last active October 24, 2019 20:05
ZSH
# If you come from bash you might have to change your $PATH.
# export PATH=$HOME/bin:/usr/local/bin:$PATH
# Path to your oh-my-zsh installation.
export ZSH="/home/carlo/.oh-my-zsh"
# Set name of the theme to load --- if set to "random", it will
# load a random theme each time oh-my-zsh is loaded, in which case,
# to know which specific one was loaded, run: echo $RANDOM_THEME
# See https://github.com/robbyrussell/oh-my-zsh/wiki/Themes
@carloschneider
carloschneider / select-estados-br
Created October 25, 2018 13:49 — forked from cassiocardoso/select-estados-br
Select com uma lista de todos os estados brasileiros.
<select name="estados-brasil">
<option value="AC">Acre</option>
<option value="AL">Alagoas</option>
<option value="AP">Amapá</option>
<option value="AM">Amazonas</option>
<option value="BA">Bahia</option>
<option value="CE">Ceará</option>
<option value="DF">Distrito Federal</option>
<option value="ES">Espírito Santo</option>
<option value="GO">Goiás</option>
@carloschneider
carloschneider / fauxSelect.js
Created April 6, 2018 16:15 — forked from philfreo/fauxSelect.js
Give a <select> element a different look, but still retain all OS benefits of using a real <select> (full screen height options list, keyboard navigation, etc.)
// Make faux dropdowns show their new value, when it's changed.
$(document.body).on('change', '.faux-select-wrapper select', function(e) {
var select = $(e.target);
$.fn.fauxSelect.refresh(select);
});
$.fn.fauxSelect = function(method) {
var select = this;
// if fauxSelect is being called again on an already-handled element, then just update the
// visible text