Skip to content

Instantly share code, notes, and snippets.

View ruifonseca's full-sized avatar

Rui Fonseca ruifonseca

  • Milky Way → Solar System → Earth
View GitHub Profile
@ruifonseca
ruifonseca / gtrans
Last active August 14, 2019 09:45
Simple command line interface to Google Translate API
#!/usr/bin/env ruby
# Inspired by https://ctrlq.org/code/19909-google-translate-api.
# I usually keep these things under ~/bin...
require 'net/http'
require 'cgi'
require 'json'
# quit unless our script gets two command line arguments