Skip to content

Instantly share code, notes, and snippets.

require 'json'
filename = '<username>_diaspora_data_<hash>.json'
username = '<username>'
file = File.read(filename)
data_hash = JSON.parse(file)
bio = data_hash['user']['profile']['entity_data']['bio']
user = User.find_by(username: username)
conky.config = {
background = true,
use_xft = true,
font = 'Ubuntu:pixelsize=14',
xftalpha = 0.5,
update_interval = 1,
total_run_times = 0,
own_window = true,
own_window_type = 'normal',
own_window_transparent = true,
@programizer
programizer / .rb
Created April 5, 2018 07:45
A first Gist for using Coinbase commerce API in bountysource
# Using Coinbase Commerce API
# See https://commerce.coinbase.com/docs/api/#create-a-checkout
# And https://github.com/httprb/http/wiki/Passing-Parameters
# In Gemfile:
gem 'http'
# In rails.rb (e.g.):
require 'http'
# In cart_controller.rb (e.g.):