Skip to content

Instantly share code, notes, and snippets.

View meskarune's full-sized avatar
Halfway back to productivity

Dolores Portalatin meskarune

Halfway back to productivity
View GitHub Profile
local plugin = {}
local plugin.commands = {}
plugin.polls = {}
plugin.commands.open = function (args)
-- poll open <poll name> <response1, response2, ...>
local _, _, pollid, responses = args.message:find("open%s+(%S+)%s+(.+)")
plugin.polls[#plugin.polls + 1] = { pollid = {poll_creator = args.sender, choices = {}, votes = {} } }
if responses then

Contributing to IRC Bot

Thanks for your interest in contributing to IRC Bot. What follows is a set of contribution guidelines to make contributing to this project easier.

Bugs and Feature Requests

Bug reports should contain any relevant information from the bot run with debugging set to true. Also explain what actions you took to cause the error and what you think might be the cause of the bug.

@meskarune
meskarune / dict.lua
Last active March 26, 2019 18:32
get dictionary definitions
#!/usr/bin/env lua
local host, port = "all.dict.org", 2628
local socket = require("socket")
local tcp = assert(socket.tcp())
-- rfc: https://tools.ietf.org/html/rfc2229
-- list databases: SHOW DB
-- get definition: DEFINE gcide loquacious
#!/usr/bin/env bash
FG=(7 0 1 2 3 4 5 6)
BG=(0 8 1 9 2 10 3 11 4 12 5 13 6 14 7 15)
#echo " $(tput setaf 7)█$(tput bold)█ $(tput sgr0)White"
#echo " $(tput setaf 0)█$(tput bold)█ $(tput sgr0)Black"
#echo " $(tput setaf 1)█$(tput bold)█ $(tput sgr0)Red"
#echo " $(tput setaf 2)█$(tput bold)█ $(tput sgr0)Green"
#echo " $(tput setaf 3)█$(tput bold)█ $(tput sgr0)Yellow"
@meskarune
meskarune / github.md
Created March 25, 2019 18:43
git repo syncing

git remote add upstream https://github.com//.git

git fetch upstream

git checkout master

git merge upstream/master

git push

@meskarune
meskarune / vimrc
Last active March 17, 2019 03:53
vim statusline
" Status line
" default: set statusline=%f\ %h%w%m%r\ %=%(%l,%c%V\ %=\ %P%)
" Warning for trailing spaces
function! StatuslineTrailingSpaceWarning()
if !exists("b:statusline_trailing_space_warning")
if search('\s\+$', 'nw') != 0
let b:statusline_trailing_space_warning = '§ '
else
let b:statusline_trailing_space_warning = ''
_NET_WM_STATE(ATOM) = _NET_WM_STATE_ABOVE
_NET_WM_USER_TIME(CARDINAL) = 0
WM_NORMAL_HINTS(WM_SIZE_HINTS):
program specified location: 381, 131
XdndAware(ATOM) = BITMAP
_MOTIF_WM_HINTS(_MOTIF_WM_HINTS) = 0x2, 0x0, 0x0, 0x0, 0x0
_NET_WM_ICON(CARDINAL) = Icon (128 x 128):
@meskarune
meskarune / tint2rc
Created March 11, 2019 15:48
tint2config file
# Backgrounds
# Background 1: Active desktop name
rounded = 0
border_width = 0
border_sides = TBLR
border_content_tint_weight = 0
background_content_tint_weight = 0
background_color = #000000 0
border_color = #000000 0
background_color_hover = #000000 0
@meskarune
meskarune / tmux.conf
Created March 9, 2019 23:08
tmux theme for status/panel on bottom
set -g pane-active-border-fg "colour13"
set -g pane-border-fg "colour239"
set -g message-fg "colour0"
set -g message-bg "colour13"
set -g status-justify left
set -g status-bg "colour236"
set -g status-fg white
@meskarune
meskarune / vimrc
Last active October 18, 2020 10:22
custom vim status line similar to airline
" status bar colors
au InsertEnter * hi statusline guifg=black guibg=#d7afff ctermfg=black ctermbg=magenta
au InsertLeave * hi statusline guifg=black guibg=#8fbfdc ctermfg=black ctermbg=cyan
hi statusline gui=bold guifg=black guibg=#8fbfdc cterm=bold ctermfg=black ctermbg=cyan
" Status line
" default: set statusline=%f\ %h%w%m%r\ %=%(%l,%c%V\ %=\ %P%)
autocmd cursorhold,bufwritepost * unlet! b:statusline_trailing_space_warning