Skip to content

Instantly share code, notes, and snippets.

View ramalho's full-sized avatar
🚄
operador de trem

Luciano Ramalho ramalho

🚄
operador de trem
View GitHub Profile
@ramalho
ramalho / go-missing-examples.md
Created January 14, 2018 14:50 — forked from andrestc/go-missing-examples.md
Go std lib funcs/methods missing examples

About this

This list has the goal of helping developers interested in contributing to the Go language but are unsure of where to start. This was not generated manually so some functions and methods here may not require examples (maybe because they are too simple, e.g .String()) and some of these may only make sense in a package level example (which are not considered for this list yet). Use your best judgment and check the documentation before you open up a CL to add an example.

I will try to keep this list as up to date as possible. If you find any mistakes, please comment below and I will try to fix it. I plan on release the code I used to generate this in the future, so other go projects can benefit from it.

@ramalho
ramalho / pmp2jpeg.py
Created November 12, 2017 23:08
Utility to "convert" Sony PMP photo files to JPEG
#!/usr/bin/env python3
"""Extract JPEG files from Sony PMP files"""
import sys
import os
for name in sys.argv[1:]:
print(name, end='->')
with open(name, 'rb') as fp:
@ramalho
ramalho / flag-2
Created October 22, 2017 16:46
Bandeira do Brasil
stroke 0
# Start by drawing a green background.
background "#009b3a"
# We'll draw the yellow diamond as two triangles: a top, and a bottom.
color "#fedf00"
move -200
polygon 0, 0, 200, -130, 400, 0 # Top Half
@ramalho
ramalho / gist:e56ac0c0454540cf259c316a567ad188
Created October 22, 2017 16:45
Brazilian flag (simple)
stroke 0
# Start by drawing a green background.
background "#009b3a"
# We'll draw the yellow diamond as two triangles: a top, and a bottom.
color "#fedf00"
move -200
polygon 0, 0, 200, -130, 400, 0 # Top Half
@ramalho
ramalho / pense-como-pythonista.html
Created July 22, 2017 16:51
Pense como uma pythonista
<!DOCTYPE html>
<html>
<head><meta charset="utf-8" />
<title>Pense como uma pythonista</title><script src="https://cdnjs.cloudflare.com/ajax/libs/require.js/2.1.10/require.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/2.0.3/jquery.min.js"></script>
<style type="text/css">
/*!
*
* Twitter Bootstrap
@ramalho
ramalho / gnome-version.py
Last active May 1, 2017 01:29
Simple script to display Gnome 3 version
#!/usr/bin/env python3
import xml.etree.ElementTree as ET
tags = 'platform minor micro'.split()
doc = ET.parse('/usr/share/gnome/gnome-version.xml')
print('.'.join(doc.find(tag).text for tag in tags))
@ramalho
ramalho / RethinkDB-why-we-failed.md
Created January 19, 2017 14:46
RethinkDB: why we failed
layout title
post
RethinkDB: why we failed

Posted on Github by Slava Akhmechet

When we [announced][shutdown-announcement] that RethinkDB is shutting down, I promised to write a post-mortem. I took some time to process the experience, and I can now write about it clearly.

Keybase proof

I hereby claim:

  • I am ramalho on github.
  • I am ramalho (https://keybase.io/ramalho) on keybase.
  • I have a public key whose fingerprint is CAF0 10C6 5EED B222 EB8B 044A D284 12E9 7687 D71E

To claim this, I am signing this object:

@ramalho
ramalho / genius.py
Created October 22, 2015 21:03
Genius clone on Raspberry Pi with Pingo.io, edited live on Midori
import time
import random
import pingo
import itertools
rpi = pingo.detect.get_board()
class Buzzer(object):
https://maps.googleapis.com/maps/api/staticmap?center=40.714728,-73.998672&zoom=16&size=600x300&maptype=hybrid&key=AIzaSyApIx-jA9MblvDcvwBB3VxzKhGEWwLsY1k