Skip to content

Instantly share code, notes, and snippets.

View danielfl's full-sized avatar

Daniel Ferreira de Lima danielfl

View GitHub Profile
from boto import ec2
import requests
import urllib2, base64
for reg in ec2.regions():
wasted_space = 0
print "connecting to ", reg.name
try:
conn = ec2.connect_to_region(reg.name)
vol = conn.get_all_volumes()
@danielfl
danielfl / i3-btcprice.py
Created January 12, 2017 13:27
At i3blocks: [btc] command=$HOME/.i3/i3-btcprice.py interval=1 separator=false
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import time
import urllib2
import json
last_price=10.0
ml="-"
def get_data2(web_site_api, currency_name):
global last_price
@danielfl
danielfl / i3exit
Last active January 16, 2016 22:22 — forked from jcyamo/i3-exit
Exit script for the i3 window manager based off of exit script from CrunchBang Linux.
#!/usr/bin/env python
# based on cb-exit used in CrunchBang Linux <http://crunchbanglinux.org/>
# @danielfl: a few fixes to work in actual *buntu versions
import pygtk
pygtk.require('2.0')
import gtk
import os
import getpass