Skip to content

Instantly share code, notes, and snippets.

View Raimondi's full-sized avatar

Israel Chauca Fuentes Raimondi

View GitHub Profile
^[[36m-- SYNTAX PROBLEM - /var/folders/rc/yr76zbp97nn03xncbwbx05jw0000gn/T/nvimGL5Ztr/1.el
Processing file /var/folders/rc/owing things:sing your code!
ERRORSp97nn03xncbwbx05jw0000gn/T/nvimGL5Ztr/1.elm
function! HighlightCurrent()
let pathlist = split(expand('%'), '/')
exec "Explore " . getcwd()
while 1
let elem = remove(pathlist, 0)
if !search(elem, 'W')
break
endif
if !empty(pathlist)
exec "normal \<CR>"
@Raimondi
Raimondi / naughty.py
Created July 20, 2015 01:50
Keep a naughty list with weechat
# -*- coding: utf-8 -*-
#
# Copyright (c) 2015 by Israel Chauca F. <[email protected]>
# Copyright (c) 2014 by Filip H.F. "FiXato" Slagter <[email protected]>
#
# Naughty: a quick WeeChat script to mark users as "naughty" and display a
# warning behind what they post.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@Raimondi
Raimondi / new_indentexpr.fish
Last active August 29, 2015 14:24
vim-fish test files
set foo bar
if set -q foo
echo \
continued\
lines
end
switch $foo
case 'abc'
echo 14
case 'def'
@Raimondi
Raimondi / correct_indent.fish
Last active August 29, 2015 14:23
Indentation test
set foo bar
if set -q foo
echo \
continued\
lines
end
switch $foo
case 'abc'
echo 14
case 'def'
@Raimondi
Raimondi / op_on_visual_block.vim
Last active August 29, 2015 14:11
Do stuff to visual blocks.
function! OperateOnVisualBlock(expr)
let save_reg = getreg('x')
let save_reg_type = getregtype('x')
normal! gv"xy
let list = split(@x, '\n')
let list = eval(printf(a:expr, 'list'))
let @x = join(list, "\n")
call setreg('X', '', 'b')
normal! gv"xp
call setreg('x', save_reg, save_reg_type)
@Raimondi
Raimondi / .bashrc
Last active August 29, 2015 14:07 — forked from danopia/.bashrc
Use clippy for shell errors.
function command_not_found_handle {
{echo "It looks like you're trying to run a UNIX command.";echo "Would you like some help with that?"; echo; /usr/lib/command-not-found $1 2>&1|fold -sw 55}|cowsay -f$HOME/.clippy -n
}
@Raimondi
Raimondi / reg_editor.vim
Last active August 29, 2015 14:06 — forked from OliverUv/.vimrc
Edit registers in vim.
nnoremap <silent><expr><leader>m ":<C-U>let @".v:register." = ".string(getreg(v:register))."<CR><C-F>"
@Raimondi
Raimondi / r_wallpapers.py
Created February 17, 2014 22:26
scraper for /r/wallpapers @http://pastebin.com/8RKrFifq
#!/usr/bin/python
#imports
import urllib2
import os
from array import array
#variables
sourceholder = ""
index = 0
@Raimondi
Raimondi / taiku
Created January 13, 2014 20:56
Play a youtube song in iTunes.
#!/usr/bin/env ruby
# usage:
# taifu http://www.youtube.com/watch?v=KPWfBfFFrwsx
# taifu depends on VLC.app and rb-appscript gem
require 'rubygems'
require 'appscript'
require 'fileutils'