Skip to content

Instantly share code, notes, and snippets.

View neverkas's full-sized avatar

Emmanuel Lazarte neverkas

View GitHub Profile

emacs --daemon to run in the background. emacsclient.emacs24 <filename/dirname> to open in terminal

NOTE: "M-m and SPC can be used interchangeably".

  • Undo - C-/
  • Redo - C-?
  • Change case: 1. Camel Case : M-c 2. Upper Case : M-u
  1. Lower Case : M-l
@neverkas
neverkas / append-string.c
Last active October 9, 2021 22:15
Probando commons
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
/*
*
* - El primer argumento es la dirección de memoria de un puntero a char &(ptr) ó (char**)
* - Se le pasa la dirección de memoria del puntero porque hace un realloc
* - Se le puede pasar sólo el puntero, y funciona pero podría fallar... (???)
* Ej. string_append(&saludo, nombre);
@neverkas
neverkas / Makefile
Last active October 29, 2021 03:31
Compilar+Ejecutar proyecto java con maven
PACKAGE = server
MAIN_CLASS = Server
MIGRATION_CLASS = Bootstrap
#MAVEN_CMD=mvn exec:java
.PHONY: all
all: build run
.PHONY: build
build:
@neverkas
neverkas / .env
Created December 21, 2021 05:00
Jugando con makefiles
PATH_TAREA=tarea
TEMPLATE_TAREA_BEFORE=.templates/merge-conflicto/before/
TEMPLATE_TAREA_AFTER=.templates/merge-conflicto/after/
CHECK_BRANCH_tarea=$(shell git show-ref refs/heads/master)
BRANCH_tarea_new=feature/tarea2
PATH_LOGS=/logs/errors.log
@neverkas
neverkas / commons.mk
Created January 16, 2022 12:26
Makefile (watcher + autodependencies)
MAKE += -f commons.mk # le cambiamos el nombre de nuestro makefile
RM = rm -rfv
DIR_DEP := .dep
DIR_BIN := bin
DIR_SRC := src
DIR_OBJ := .obj
DIRS := $(DIR_DEP) $(DIR_BIN) $(DIR_SRC) $(DIR_OBJ)
SRC := $(wildcard $(DIR_SRC)/*.c)
DEP := $(SRC:$(DIR_SRC)/%.c=$(DIR_DEP)/%.d)
@neverkas
neverkas / export-simple-org-html.mk
Last active February 2, 2022 18:06
Exportar .org a HTML (Versión Simple)
ORG_PATH := src/org-doc
HTML_PATH := views
ORG := $(wildcard $(ORG_PATH)/*.org)
# fundamental evitar espacios en $(var:%.old=%.new)
HTML = $(ORG:$(ORG_PATH)/%.org=$(HTML_PATH)/%.html)
RM := rm -rfv
.PHONY: all
all: export
@neverkas
neverkas / README.org
Last active January 25, 2022 14:46
GNU Make - Funciones utiles en C
@neverkas
neverkas / Makefile
Last active February 19, 2022 15:58
Export org files to HTML with Docker+Pandoc
all: down up
b build:
$(info Construyendo imagenes...)
$(call docker_cmd, build)
u up:
$(info Ejecutando contenedor/es...)
$(call docker_cmd, up)
@neverkas
neverkas / ComandosLinux.sh
Last active February 2, 2022 21:10
Comandos Raritos de Linux
# - modificamos el volumen de Master al 50%
# - podemos usar valor%+ para incrementar ó valor%- para decrementar
amixer set Master 50%
# mismo propósito que `amixer` pero con GUI (interfáz gráfica de usuario)
alsamixer
# contar cantidad de archivos/directorios
ls | wc -c
@neverkas
neverkas / ComandosNeoVim.org
Last active February 4, 2022 18:32
Comandos Raritos en NeoVim

Comandos Raritos en NeoVim

Comandos Raritos

ComandoDescripción
:nohDesactivar las palabras resaltadas hasta la próxima búsqueda
:setnumberMostrar número de linea
.s/cadena/nueva/gBuscar/Reemplazar en la misma linea que el cursor
s/cadena/nueva/gcBuscar/Reemplazar globalmente pero pide confirmación al reemplazar

Atajos Raritos

v+$Seleccionar texto hasta fin de linea