Skip to content

Instantly share code, notes, and snippets.

@igorgue
igorgue / nvim_init.vim
Last active Aug 31, 2020
Configuration for nvim I also use nvim-gtk
View nvim_init.vim
call plug#begin('~/.config/nvim/plugged')
" Keep Plug commands between plug#begin/end.
Plug 'neoclide/coc.nvim', {'branch': 'release'}
Plug 'itchyny/lightline.vim'
Plug 'chriskempson/vim-tomorrow-theme'
Plug 'preservim/nerdtree'
Plug 'tpope/vim-fugitive'
Plug 'tpope/vim-surround'
Plug 'tpope/vim-speeddating'
Plug 'tpope/vim-git'
View gnome_default_theme.sh
#!/bin/zsh
gsettings set org.gnome.desktop.interface gtk-theme Adwaita
gsettings set org.gnome.desktop.interface icon-theme Adwaita
gsettings set org.gnome.desktop.interface cursor-theme Adwaita
dconf write /org/gnome/shell/extensions/user-theme/name "''"
gsettings set org.gnome.desktop.wm.preferences theme Default
View .gvimrc.local
HackingMode
"PresentationMode
"colorscheme danger
"colorscheme ir_black
set relativenumber
set number
set nofoldenable
View .vimrc.local
"set background=dark
"set background=light
"colorscheme danger
"colorscheme solarized
colorscheme ir_black
set background=dark
set nofoldenable
let NERDTreeIgnore = ['\.pyc$', '__pycache__$']
set lazyredraw
View load_upub_electrum.py
from electrum.bitcoin import pubkey_to_address
from electrum.constants import BitcoinTestnet
from electrum.keystore import BIP32Node
# Mnemonic: combine defy review meadow hamster future sphere awake upper garbage aunt fish exact minute width
# HD Path: m/49'/1'/0'
xpub = 'upub5DiY8ttzMX33hN2pEFPvdhgucA32AQ58QnHw7Doy9jWDThfZK8RZL1rCkqUBgBLWyc8unNABCdqm6zPFXFiqNzBNQHqFMhXhenqHHAQxyNN'
node = BIP32Node.from_xkey(xpub, net=BitcoinTestnet())
View keybase.md

Keybase proof

I hereby claim:

  • I am igorgue on github.
  • I am igorgue (https://keybase.io/igorgue) on keybase.
  • I have a public key ASAQaxosQ5fWJLvhgWPOQ_G2vLvWhCWRdcpnZiqEfCmqtgo

To claim this, I am signing this object:

@igorgue
igorgue / grandpa_script.rb
Last active Oct 3, 2019
This script formats audio files to the Bastl Instrument's GrandPA's format, to use just install ffmpeg (brew install ffmpeg), copy it to a directory with files that end in ('.mp3', '.wav', '.aiff', '.ogg') and run it. It overwrites everything too so be careful (try first, it works for me).
View grandpa_script.rb
#!/usr/bin/env ruby
# What's this?
# ============
#
# A script that converts all kinds of files to the file format Bastl Instruments GrandPA requires.
#
# Install
# =======
#
View gameoflife.rb
# Conway's Game of Life in Ruby
# http://en.wikipedia.org/wiki/Conway's_Game_of_Life
class Cell
attr_writer :neighbors
def initialize(seed_probability)
@alive = seed_probability > rand
end
View gist:8262314
def get_order(request, order_id):
order = Order.get(id=order_id)
data = {}
if request.method == 'GET':
data['order'] = order
elif request.method == 'POST':
order.amount = request.POST.get('amount')
order.save()
elif request.method == 'DELETE':
View igorgue.zsh-theme
PROMPT='%{$fg[cyan]%}☁ %{$reset_color%}[%{$fg_no_bold[green]%}$(rvm_ruby)$(current_dir)$(git_last_sha)%{$reset_color%}] '
RPROMPT='$(git_time_since_commit)$(git_prompt_info)'
#PROMPT='%{$fg_no_bold[green]%}$(current_dir)%{$reset_color%} $(git_time_since_commit)$(git_last_sha)$(git_prompt_info)
ZSH_THEME_GIT_PROMPT_PREFIX="%{\e[0;35m%}"
ZSH_THEME_GIT_PROMPT_SUFFIX="%{$reset_color%}"
ZSH_THEME_GIT_PROMPT_DIRTY="%{$reset_color%} %{$fg_bold[red]%}✘%{$reset_color%}"
ZSH_THEME_GIT_PROMPT_CLEAN="%{$reset_color%} %{$fg_bold[green]%}✔%{$reset_color%}"
# Colors vary depending on time lapsed.