Skip to content

Instantly share code, notes, and snippets.

# remap prefix from 'C-b' to 'C-a'
unbind C-b
set-option -g prefix C-a
bind-key C-a send-prefix
# split panes using | and -
bind | split-window -h
bind - split-window -v
unbind '"'
unbind %
" start ~/.config/nvim/init.vim
set runtimepath^=~/.vim runtimepath+=~/.vim/after
let &packpath=&runtimepath
source ~/.vimrc
" end ~/.config/nvim/init.vim
" show line numbers
set number
" defines line numbers width
set numberwidth=2
@carolusquintus
carolusquintus / Convert .mov or .MP4 to .gif.md
Created July 15, 2022 15:49 — forked from SheldonWangRJT/Convert .mov or .MP4 to .gif.md
Convert Movie(.mov) file to Gif(.gif) file in one command line in Mac Terminal

This notes is written by Sheldon. You can find me with #iOSBySheldon in Github, Youtube, Facebook, etc.

Need

Convert .mov/.MP4 to .gif

Reason

As a developer, I feel better to upload a short video when I create the pull request to show other viewers what I did in this PR. I tried .mov format directly got after finishing recording screen using Quicktime, however, gif offers preview in most web pages, and has smaller file size.

This is not limited to developer, anyone has this need can use this method to convert the files.

@carolusquintus
carolusquintus / .xbindkeysrc
Last active July 2, 2022 02:00
.xbindkeys for MX Master 3S | Media player
# https://wiki.archlinux.org/title/Logitech_MX_Master#Xbindkeys
# https://javierin.com/configurar-logitech-mx-master-2s-en-ubuntu/
# Subir volumen con la rueda del pulgar
"xte 'key XF86AudioRaiseVolume'"
b:6
# Bajar volumen con rueda del pulgar
"xte 'key XF86AudioLowerVolume'"
b:7
@carolusquintus
carolusquintus / primes.c
Last active July 9, 2021 02:30
Starting from 3
#include <stdio.h>
#define MIN 3
#define MAX 100000
int main()
{
int primes[10000] = { 2 };
int totalPrimes = 1;
@carolusquintus
carolusquintus / PropertyLogger.java
Last active January 31, 2022 22:35 — forked from sandor-nemeth/PropertyLogger.java
Spring Boot - Log all configuration properties on application startup
import java.util.Arrays;
import java.util.List;
import java.util.stream.StreamSupport;
import lombok.extern.slf4j.Slf4j;
import org.springframework.context.annotation.Profile;
import org.springframework.context.event.ContextRefreshedEvent;
import org.springframework.context.event.EventListener;
import org.springframework.core.env.AbstractEnvironment;
import org.springframework.core.env.EnumerablePropertySource;
import org.springframework.core.env.Environment;
# Only for fun
x <- array(matrix(runif(100000, 0, 100000), 10000, 10000), matrix(runif(100000, 0, 100000), 10000, 10000))
<snippet>
<content><![CDATA[public ${1:returnType} get${2:Property}() {
return ${3:property};
}
public void set${2:Property}(${1:returnType} ${3:property}) {
this.${3:property} = ${3:property};
}]]></content>
<tabTrigger>gs</tabTrigger>
</snippet>
function Edificio(elevadores, planta) {
this.elevadores = elevadores;
this.planta = planta;
}
function Elevador(planta) {
this.planta = planta;
this.enServicio = false;
this.subir = function() {
@carolusquintus
carolusquintus / KonamiCode.js
Last active August 29, 2015 14:09
Konami Code implementation for Dojo Framework. Eventually it will change to be more general.
// KONAMI CODE: ↑ ↑ ↓ ↓ ← → ← → B A
var konamiCode = [38, 38, 40, 40, 37, 39, 37, 39, 98, 97];
var index = 0;
window.onkeypress = function(e) {
var keyPressed = (e.charCode != 0 ? e.charCode : e.keyCode);
if (keyPressed == konamiCode[index]) {
index++;