Skip to content

Instantly share code, notes, and snippets.

🔌
Disconnected

Manoel Vilela ryukinix

🔌
Disconnected
Block or report user

Report or block ryukinix

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@ryukinix
ryukinix / find-executable.lisp
Last active May 18, 2020
find-executable in Common Lisp
View find-executable.lisp
(defun executables ()
(loop with path = (uiop:getenv "PATH")
for p in (uiop:split-string path :separator ":")
for dir = (probe-file p)
when (uiop:directory-exists-p dir)
append (uiop:directory-files dir)))
(defun find-executable (name)
(find name (executables)
:test #'equalp
@ryukinix
ryukinix / kmp-substring-search.lisp
Created Jul 13, 2017
KMP substring problem implementation on Common Lisp
View kmp-substring-search.lisp
;; kmp-fp: Substring Search @ HackerRank
;; Date: Thu 13 Jul 2017 08:48:40 AM -03
;; Manoel Vilela
;; NOTE: I'm programming in Common Lisp or in LOOP-MACRO?
(defun make-prefix-table (pattern length)
"Get the shift prefix array table to use on KMP
algorithm. This value is used to shift string comparison
on the next evaluation after a mismatch"
@ryukinix
ryukinix / crispim-algorithm.py
Last active Nov 13, 2019
Algoritmo de sumarização automática de textos feito originalmente por Juca Crispim; seu artigo abordando esse método simplista inspirado no TextRank está no link anexado ao código.
View crispim-algorithm.py
#!/usr/bin/env python
#
# Python Script
#
# Copyright © Juca Crispim
#
# original source: https://goo.gl/NhfKET
import math
import nltk
@ryukinix
ryukinix / rss_conky
Last active Sep 25, 2019
An alternative parser for rss because conky doesn't have ATOM supported yet
View rss_conky
# — SETTINGS — #
update_interval 20
total_run_times 0
net_avg_samples 1
cpu_avg_samples 1
imlib_cache_size 0
double_buffer yes
no_buffers yes
use_xft yes
xftfont Zekton:size=9
@ryukinix
ryukinix / dateparser_lark.py
Last active Aug 21, 2019
An EBNF grammar based in the Lark Parser designed to parse multivariate date formats. (PT_BR)
View dateparser_lark.py
#!/usr/bin/env python3
# coding: utf-8
#
# Copyright © Neoway Business Solutions
#
# @project: Diário Oficial
# @author: Manoel Vilela
# @email: manoel.neto@neoway.com.br
#
@ryukinix
ryukinix / sum-args.c
Created Mar 12, 2019
Sum posix argv integers
View sum-args.c
/*
* Manoel Vilela © 2019
*
* Why this? Just because I was bored
* Date: Tue 12 Mar 2019 12:21:48 AM -03
*/
#include <stdio.h>
#include <stdlib.h>
View *scratch*.el
;; ▓█████ ███▄ ▄███▓ ▄▄▄ ▄████▄ ██████
;; ▓█ ▀ ▓██▒▀█▀ ██▒▒████▄ ▒██▀ ▀█ ▒██ ▒
;; ▒███ ▓██ ▓██░▒██ ▀█▄ ▒▓█ ▄ ░ ▓██▄
;; ▒▓█ ▄ ▒██ ▒██ ░██▄▄▄▄██ ▒▓▓▄ ▄██▒ ▒ ██▒
;; ░▒████▒▒██▒ ░██▒ ▓█ ▓██▒▒ ▓███▀ ░▒██████▒▒
;; ░░ ▒░ ░░ ▒░ ░ ░ ▒▒ ▓▒█░░ ░▒ ▒ ░▒ ▒▓▒ ▒ ░
;; ░ ░ ░░ ░ ░ ▒ ▒▒ ░ ░ ▒ ░ ░▒ ░ ░
;; ░ ░ ░ ░ ▒ ░ ░ ░ ░
;; ░ ░ ░ ░ ░░ ░ ░
View test.el
(require 'package)
(setq packages-archives '("melpa" . "https://melpa.org/packages/"))
(defvar *my-packages* '(company
slime-company
doom-themes
powerline
airline-themes)
"My wonderful packages")
@ryukinix
ryukinix / quickproject-cli.lisp
Created Feb 25, 2019
A Quickproject CLI, portable script for Linux
View quickproject-cli.lisp
#!/usr/bin/sbcl --script
#|
Manoel Vilela © 2018
This script helps me building a simple ASDF project for Common Lisp
based in the library quickproject.
|#
@ryukinix
ryukinix / lock.sh
Last active Feb 16, 2019
How lock your system before suspend with openrc init via elogind using slock
View lock.sh
#!/bin/sh
#
# /lib/elogind/system-sleep/lock.sh
# Lock before suspend integration with elogind
username=lerax
userhome=/home/$username
export XAUTHORITY="$userhome/.Xauthority"
export DISPLAY=":0.0"
You can’t perform that action at this time.