Skip to content

Instantly share code, notes, and snippets.

View romgrk's full-sized avatar
♥️
hey

Rom Grk romgrk

♥️
hey
View GitHub Profile

Keybase proof

I hereby claim:

  • I am romgrk on github.
  • I am romgrk (https://keybase.io/romgrk) on keybase.
  • I have a public key whose fingerprint is A22C A800 18BD 08B1 5AD8 8ED3 0EC3 402D 7145 2474

To claim this, I am signing this object:

export ALIASES="$HOME/.aliases'
# CMD and UNCMD are permanent alias
function cmd () {
if [[ $# == 1 ]]; then
print $(alias_value $1)
return 0
fi
if [[ -w $ALIASES ]]; then
#!/bin/bash
# Make sure to 'chmod +x' this, and mv it in your path.
# Quick dl command:
#$ wget https://gist.githubusercontent.com/romgrk/0ba7a864a4e6c76eefd3/raw/92015b98899d77ab908d4b90e67b4fcfd39ad1d6/dropdownterminal && chmod +x ./dropdownterminal
# Recommended invocation: (interactive mode)
#$ ./dropdownterminal -i
func_dropdownterminal () {
@romgrk
romgrk / moonrepl.lua
Last active October 29, 2023 02:35
MoonScript REPL (using luarepl)
#!/usr/bin/env lua
-- This is an example quick-implementation of a MoonScript REPL,
-- using LuaRepl.
--
-- Requires:
-- - moonscript and luarepl, of course
-- - log (https://github.com/romgrk/log.moon)
--
-- The additionnal 'log' is my personnal logging utility.
ZSH_ALIASES=${ZSH_ALIASES:-"$HOME/.aliases"}
# CMD and UNCMD are permanent alias
# FIXME: multiple 'cmd' create multiple entries (but only the last is sourced)
# 'uncmd' remove all entries
function cmd () {
if [[ $# == 0 ]]; then
sed -n '/^alias/ p' <$ZSH_ALIASES
return 0
elif [[ $# == 1 ]]; then
awk '
<dom-module id="nyaovim-app">
<template>
<style>
html,body {
background: transparent;
}
@keyframes blink {
0% {
@romgrk
romgrk / dropdown.zsh
Last active December 17, 2017 22:38
# For usage with https://gist.github.com/romgrk/0ba7a864a4e6c76eefd3
# drop-down-terminal gnome extension configuration
# F11/A-F11/C-F11 size-down/medium/up the terminal
# F12 + [0-9] sets background opacity
# F11 & M-F11 = sizeup/sizedown
function _dropdown_h_normal () {
dropdownterminal h 50%
}
" If someone ever needs:
" Colors convertion library:
" Hex, RGB, HSL
" it was all made for
" func color#darken( hex:String, amount:[String | Number | Float] ) and
" func color#lighten( hex:String, amount:[String | Number | Float] )
" where r,g,b ∈ [0, 255]
@romgrk
romgrk / hi.vim
Last active February 12, 2016 11:28
" !::exe [so %]
" Author: romgrk
" Description: hightlight helpers
" Date: 07 Oct 2015
" this is the README:
" highlight autoload function very handy for scripting the syntax-hl
" hi#fg and hi#bg ('GoupName' [, color:String])
" are both getter and setters
" hi#( name [, group:[] | fg [,bg [,attr ] ] ] )
" Author: romgrk | License: JSON-like
" This SHOULD (RFC 2119) go in a $RUNTIME/ftplugin/vim/ directory.
" (personnally I have it in $RUNTIME/after/ftplugin/vim.vim)
" Alt+i in insert mode in vimscript files inserts the next keystroke as vim-notation
" - there are some special keys: e.g.
" <A-i><S-,> inserts '<lt>' literally
" <A-i>i inserts '<SID>' literally
" <A-i>b inserts '<buffer>' literally