Skip to content

Instantly share code, notes, and snippets.

View shingonoide's full-sized avatar

Rui Andrada shingonoide

View GitHub Profile
@shingonoide
shingonoide / keybase.md
Created June 20, 2016 07:02
My keybase proof

Keybase proof

I hereby claim:

  • I am shingonoide on github.
  • I am shingonoide (https://keybase.io/shingonoide) on keybase.
  • I have a public key ASD9Vww-BH1NvdsPNpnGdOxO4Tg0gHSSovLoA_Zt8QXlQAo

To claim this, I am signing this object:

@shingonoide
shingonoide / cleanup_odoo_session.sh
Last active November 13, 2025 15:04
Simple script to clean up Odoo session files
#!/bin/sh
# example
# add this to crontab -e of odoo user
# curl -sL https://gist.github.com/shingonoide/1947a97e3c00168372e950a6788ce9ad/raw/cleanup_odoo_session.sh > /tmp/cleanup_sessions.sh && sh /tmp/cleanup_sessions.sh 4
HOW_OLDER=${1:-6}
VERBOSE=${2:-0}
SESSION_FOLDER="$HOME/.local/share/Odoo/sessions"
TOTALFILES=$(find $SESSION_FOLDER -name '*.sess' | wc -l)
@shingonoide
shingonoide / README.md
Last active July 26, 2016 20:10
Patch for ruby-1.9.3-(p551) compile

Patch for apply ruby version 1.9.3

rbenv

curl -fsSL https://gist.githubusercontent.com/shingonoide/4829adebbb6387036f27723ddd44bb3b/raw/ruby_openssl_1.9.3.patch | rbenv install --patch 1.9.3-p551

01-03-2017 @ 14:39:22 - Getting the order installments...
01-03-2017 @ 14:39:22 - request[headers]:Array
(
)
01-03-2017 @ 14:39:22 - request[body]:{"api_key":"recorrenteNet_b0c03713-a906-4f03-8d69-d668b68cd99c","amount":10300,"interest_rate":"1","max_installments":"12","free_installments":"10"}
01-03-2017 @ 14:39:22 - request[to]: https://recorrente.net/1/transactions/calculate_installments_amount
01-03-2017 @ 14:39:23 - Failed to get the installments: Array
(
[headers] => Requests_Utility_CaseInsensitiveDictionary Object
@shingonoide
shingonoide / check_url_spec_error.md
Last active September 9, 2017 03:44 — forked from RafaelPrallon/check_url.md
método, spec e erros no terminal de um método para verificar se a url tem http:// ou https://

método(localizado em app/helpers/application_helper.rb):

def check_url(url)
  return true if /^(?:(?:https\:\/\/))|(?:(?:http\:\/\/))/.match(url)
  return false
end

spec(localizado em spec/models/user_spec.rb):

@shingonoide
shingonoide / gist:3d93f156c32bde2726529df649dfe443
Created March 24, 2018 17:51
Verify my for my Blockstack ID
Verifying my Blockstack ID is secured with the address 1PCcZG6DpWgg2w686ebbiS9Q3L28qtGiTt https://explorer.blockstack.org/address/1PCcZG6DpWgg2w686ebbiS9Q3L28qtGiTt