Skip to content

Instantly share code, notes, and snippets.

View sabueso's full-sized avatar
🏠
Working from home

Ramiro Magallanes sabueso

🏠
Working from home
View GitHub Profile
@sabueso
sabueso / gist:0bf8ec4ca2ddd7655a13c7e19ba6343b
Created November 15, 2021 15:38
Python3-API Ravencoin wallet balance
#!/usr/bin/env python3
import requests
#Wallet
api_url = "https://ravencoin.network/api/addr/<your_wallet_addr_here>/?noTxList=1"
balance = requests.get(api_url).json()['balance']
#Coti
api_url2 = "https://ravencoin.network/api/markets/info"
price = requests.get(api_url2).json()['price_usd']
@sabueso
sabueso / collapseaccounts.js
Created April 10, 2017 00:29
Collapse external accounts in Zimbra (with Greasemonkey)
// ==UserScript==
// @name CollapseZimbraAccounts
// @namespace CollapseZimbraAccounts
// @require http://ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js
// @include https://puthereyourzimbraURL/*
// @version 1
// @grant none
// @run-at document-end
// ==/UserScript==
@sabueso
sabueso / gnome_dark_theme.txt
Created March 24, 2017 17:27
Gnome3 dark terminal style
##Usage: replace with your profile ID and do
## dconf load /org/gnome/terminal/ < gnome_dark_theme.txt
[legacy]
dark-theme=true
schema-version=uint32 3
[legacy/profiles:/:34b240d3-9147-4115-bd21-07a7d2ebac1b]
foreground-color='rgb(238,238,236)'
rewrap-on-resize=false
@sabueso
sabueso / gist:8ad0b9ad02e3ce8b60ae39305eefba60
Created January 8, 2017 14:06
Mikrotik bind dynamic zone update
:global ipaddressfull [/ip address get [find interface="vlan2"] address]
:global ipaddress [:pick $ipaddressfull 0 [:find $ipaddressfull "/"]]
:global actualhostnameip 0.0.0.0
:do {
:put [:global actualhostnameip [:resolve host.toupdate.com]];
} on-error={ :log info "update_bind_test: Error retrieving host ip";}
:if ($ipaddress != $actualhostnameip) do={
export PS1="\[$(tput bold)\]\[$(tput setaf 1)\][\[$(tput setaf 3)\]\u\[$(tput setaf 2)\]@\[$(tput setaf 4)\]\h \[$(tput setaf 5)\]\$PWD\[$(tput setaf 1)\]]\[$(tput setaf 7)\]\\$ \[$(tput sgr0)\]"
@sabueso
sabueso / usage.py
Last active September 4, 2022 07:01
Script to dump on JSON cpu usage / temp / mem / memory usage
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import random, json, subprocess, psutil
json_key={}
def cpu_usage():
cpu_usage = psutil.cpu_percent(interval=2)
json_key['cpu_usage'] = float(cpu_usage)
@sabueso
sabueso / gist:5611dad1fb54c744de06
Created November 3, 2015 14:06
Extract number of clientes between dates in Unifi MongoDB
db.user.find({first_seen: { $gte:(Number(ISODate("2015-02-01T00:00:00.000Z")).valueOf()/1000), $lte:(Number(ISODate("2015-02-28T00:00:00.000Z")).valueOf()/1000) } }).count()

Keybase proof

I hereby claim:

  • I am sabueso on github.
  • I am sabueso (https://keybase.io/sabueso) on keybase.
  • I have a public key whose fingerprint is C311 E9F3 DB73 AB6B D25D 22CB E936 85BA 1541 F64E

To claim this, I am signing this object: