Skip to content

Instantly share code, notes, and snippets.

View neverkas's full-sized avatar

Emmanuel Lazarte neverkas

View GitHub Profile
@neverkas
neverkas / run-js-scripts-with-npm.mk
Last active January 11, 2023 19:23
Ejecutar Servidor HTTP + Evitar instalar paquetes npm de forma global
# Renombrar el archivo por Makefile
#
# Objetivos:
# 1. Ejecutar paquetes npm del proyecto inicializado
# 2. Evitar instalar paquetes npm de forma global con -g
#
package-http-server = light-server
package-params=-s . -p 8000
npm_bin=$$(npm bin)
@neverkas
neverkas / introrx.md
Created January 1, 2023 18:22 — forked from staltz/introrx.md
The introduction to Reactive Programming you've been missing
@neverkas
neverkas / core.clj
Created December 28, 2022 22:19 — forked from Misophistful/core.clj
(ns apples.core
(:require [play-clj.core :refer :all]
[play-clj.g2d :refer :all]
[play-clj.math :refer :all]))
(declare apples main-screen)
(def speed 14)
(defn- get-direction []
(cond
@neverkas
neverkas / exercism.mk
Last active September 24, 2022 14:12
Automatizar el copiar ejercicios de Exercism al el raíz de un proyecto
# cambiar "clojure" por el lenguaje que estés practicando
DIR_EXERCISES = clojure
DIR_RELATIVE_ROOT = .
# comandos útiles
MKDIR=mkdir -p
COPY=rsync -vzr
DIRS := $(dir $(wildcard $(DIR_EXERCISES)/*/))
@neverkas
neverkas / common-lisp-macros-in-elisp.el
Created September 13, 2022 19:29
Common lisp macros in elisp
;; Estructuras de control de flujo
(defmacro case (expr &rest clauses)
"Eval EXPR and choose among clauses on that value.
Each clause looks like (KEYLIST BODY...). EXPR is evaluated and compared
against each key in each KEYLIST; the corresponding BODY is evaluated.
If no clause succeeds, case returns nil. A single atom may be used in
place of a KEYLIST of one atom. A KEYLIST of t or `otherwise' is
allowed only in the final clause, and matches if no other keys match.
Key values are compared by `eql'.
@neverkas
neverkas / joelito.mk
Last active September 12, 2022 17:36
all: install run
install: install-maven install-spring
install-maven:
$(info Instalando Maven..)
@mvn install
install-spring:
$(info Instalando Spring..)
@neverkas
neverkas / sisop-simulacion.mk
Last active July 29, 2022 23:57
(sisop) Simulación imprimir contador de referencias de inodos
# simulación para probar contador de referencias de los inodos
simulacion: hardlink-2.txt borrar-softlink
borrar-softlink:
$(info Borrando softlink de hardlink)
@rm softlink.txt
@ls -li *.txt
archivo.txt:
@neverkas
neverkas / Makefile
Last active July 4, 2022 20:37
SSH Keygen
NAME_PUBLIC_KEY=id_rsa.pub
PATH_PUBLIC_KEY=~/.ssh/$(NAME_PUBLIC_KEY)
URL_UPLOAD_PUBLIC_KEY=https://transfer.sh
##@ Deploy
ssh-key-create: ## generar clave publica
$(info Creando clave SSH..)
@./popup-ssh-keygen.sh
ssh-key-print: ## imprimir clave publica
@neverkas
neverkas / gcc-redirect-logs.mk
Last active March 29, 2022 17:28
Redirect error message from gcc
BIN=test
LOG_FILE=log.txt
SOURCE_FILE=test.c
####################################################
GNU_MAKE_PRINT_RECIPE=true
GCC_REDIRECT_LOGS=true
GCC_PRINT_LOGS=false