Skip to content

Instantly share code, notes, and snippets.

@igorgue
igorgue / fuck_python.py
Created June 13, 2011 15:22
Fuck Python!
# This is 4x faster:
error = " ".join(["Unknown filename:", filename])
# Than this:
error = "Unknown filename: {0}".format(filename) # My preferred way...
# And 2x faster than this:
error = "Unknown filename: " + filename
@igorgue
igorgue / nvim_init.vim
Last active August 31, 2020 04:28
Configuration for nvim I also use nvim-gtk
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'
# Path to your oh-my-zsh configuration.
export ZSH=$HOME/.oh-my-zsh
# Set name of the theme to load.
# Look in ~/.oh-my-zsh/themes/
# Optionally, if you set this to "random", it'll load a random theme each
# time that oh-my-zsh is loaded.
export ZSH_THEME="igorgue"
# Set to this to use case-sensitive completion
#!/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
HackingMode
"PresentationMode
"colorscheme danger
"colorscheme ir_black
set relativenumber
set number
set nofoldenable
"set background=dark
"set background=light
"colorscheme danger
"colorscheme solarized
colorscheme ir_black
set background=dark
set nofoldenable
let NERDTreeIgnore = ['\.pyc$', '__pycache__$']
set lazyredraw
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())
@igorgue
igorgue / grandpa_script.rb
Last active October 3, 2019 14:05
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).
#!/usr/bin/env ruby
# What's this?
# ============
#
# A script that converts all kinds of files to the file format Bastl Instruments GrandPA requires.
#
# Install
# =======
#

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:

# Disable menu bar transparency
#defaults write NSGlobalDomain AppleEnableMenuBarTransparency -bool false
# Show remaining battery time; hide percentage
#defaults write com.apple.menuextra.battery ShowPercent -string "NO"
#defaults write com.apple.menuextra.battery ShowTime -string "YES"
# Always show scrollbars
#defaults write NSGlobalDomain AppleShowScrollBars -string "Always"