Skip to content

Instantly share code, notes, and snippets.

View antespi's full-sized avatar

Antonio Espinosa antespi

View GitHub Profile
@antespi
antespi / generic_emails_domains.py
Created October 4, 2018 08:14
Generic email domains
{
# Default domains included
"aol.com", "att.net", "comcast.net", "facebook.com", "gmail.com", "gmx.com", "googlemail.com",
"google.com", "hotmail.com", "hotmail.co.uk", "mac.com", "me.com", "mail.com", "msn.com",
"live.com", "sbcglobal.net", "verizon.net", "yahoo.com", "yahoo.co.uk",
# Other global domains
"email.com", "fastmail.fm", "games.com", "gmx.net", "hush.com", "hushmail.com", "icloud.com",
"iname.com", "inbox.com", "lavabit.com", "love.com", "outlook.com", "pobox.com", "protonmail.com",
"rocketmail.com", "safe-mail.net", "wow.com", "ygm.com",
@antespi
antespi / vlc_transcode.sh
Last active June 3, 2018 10:30
Transcoding using VLC : H264 & MP3
#!/bin/bash
VIDEO_BIT_RATE=1500
AUDIO_BIT_RATE=128
# vlc --no-repeat --no-loop -I dummy __input_file__.mov --sout "#transcode{vcodec=h264,vb=1500,acodec=mp3,ab=128,channels=2,samplerate=44100}:standard{access=file,mux=mp4,dst='__output_file__.mp4'}"
transcode() {
local fin=$1
local fout=$2
ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDNVr83Ypi4IOUKHQ+sR1uIRPwzv1dSdH0kOYIx2qfz7WeUiCRmjILSZypImzi/HORo6M3ngv/bKw2ujUReIuoG0VeXExVe3Ud+JPMVLiac6ZMIpL8lN94+fTlut9xYcsKbccpkHuVMkmjOKmTDJ0wJwb+kQVZ7IFowOnrwPqzA/nbc9YYT8vD0zASB29VP2L7QS95mvGtWCUJszDRve5qb2fImyCbcesDCE6RlCSTEmuMqNxNcsN6SEsjWtNtOJTltzs2/uJcdJhCoM8Isy6nkI4emIYxXSQxKf6L52Z5PcFTYtzg0tXIjVOzHTL56kzqGRHxqxJOXKUKBtDlMILQH Key for antespi@gmail.com
@antespi
antespi / fish_prompt.fish
Created November 27, 2016 00:48
My fish prompt
function fish_prompt --description 'Write out the prompt'
set -l last_status $status
set -l fish_custom_color_user purple
set -l fish_custom_color_host red
set -l fish_custom_color_normal yellow
set -l fish_custom_color_cwd yellow
# User
set_color $fish_custom_color_user
echo -n (whoami)
@antespi
antespi / Odoo - Rename an addon without losing data.md
Last active August 14, 2024 18:19
Odoo - Rename an addon without losing data

Odoo - Rename an addon without losing data

Rename addon

  • Change __openerp__.py addon name field
  • Change README.rst file
@antespi
antespi / Preferences: Date formats
Created November 9, 2013 09:39
My favorite date formats
date('d/m/Y H:i:s') => 31/12/1970 10:45:56
date('d/m/Y') => 31/12/1970
@antespi
antespi / HowTo: Decode base64
Created November 6, 2013 17:07
HowTo: Decode/Encode base64 using OpenSSL
Decode
======
openssl enc -base64 -d <<< SGVsbG8sIFdvcmxkIQo=
Encode
======
openssl enc -base64 <<< 'Hello, World!'
@antespi
antespi / BugFix : Nemo memory leak
Last active December 27, 2015 13:29
Bugfix: Nemo 1.8.3 has a memory leak bug (https://bugs.launchpad.net/linuxmint/+bug/1203406) Add ppa repository by Gwendal LE BIHAN fix it, and updates all packages for cinnamon and raring Mint distro version Notice: cinnamon-stable repository added, not cinnamon-nigthly!
sudo add-apt-repository ppa:gwendal-lebihan-dev/cinnamon-stable
sudo apt-get update
sudo apt-get -traring install nemo
sudo nano /etc/apt/preferences # Add this lines at the end of the file
Package: *
Pin: origin ppa.launchpad.net
Pin-Priority: 700
@antespi
antespi / HowTo: Git discard changes.md
Last active December 26, 2015 07:19
Discard changes in working tree

Save changes to stash

git stash save --keep-index

Discard stash