Skip to content

Instantly share code, notes, and snippets.

View matuu's full-sized avatar

Matuu matuu

View GitHub Profile
@matuu
matuu / metadata.json
Last active June 29, 2024 16:03
Matuu token devnet
{
"name": "Matuu",
"symbol": "MATUU",
"description": "Just a self-reference token",
"image": "https://private-user-images.githubusercontent.com/282628/344409756-0de99340-f9f4-4425-b654-9deaa0a55ac9.jpg?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MTk2NzcyNTAsIm5iZiI6MTcxOTY3Njk1MCwicGF0aCI6Ii8yODI2MjgvMzQ0NDA5NzU2LTBkZTk5MzQwLWY5ZjQtNDQyNS1iNjU0LTlkZWFhMGE1NWFjOS5qcGc_WC1BbXotQWxnb3JpdGhtPUFXUzQtSE1BQy1TSEEyNTYmWC1BbXotQ3JlZGVudGlhbD1BS0lBVkNPRFlMU0E1M1BRSzRaQSUyRjIwMjQwNjI5JTJGdXMtZWFzdC0xJTJGczMlMkZhd3M0X3JlcXVlc3QmWC1BbXotRGF0ZT0yMDI0MDYyOVQxNjAyMzBaJlgtQW16LUV4cGlyZXM9MzAwJlgtQW16LVNpZ25hdHVyZT04M2UzOWRlMDRlZjYxMzU1OTIwMmY1ZGYxOGVhMjQ5MWY0NGU0ZTA5NzU2ZWNmMjJiNmZhOWY0Y2U0NTZkYTY3JlgtQW16LVNpZ25lZEhlYWRlcnM9aG9zdCZhY3Rvcl9pZD0wJmtleV9pZD0wJnJlcG9faWQ9MCJ9.Njm8R-aJVZi7kAgJ32IuU_oLX0Uh8lNKZoIyGzGAdOI",
"extensions": {
"website": "matuu.dev",
"twitter": "matuvarela",
"telegram": "matuudev"
}
### Keybase proof
I hereby claim:
* I am matuu on github.
* I am matuudev (https://keybase.io/matuudev) on keybase.
* I have a public key ASBHK1EBvXjyWk8QWZyutHROBollP9B9AaGCtpCrr2FPDgo
To claim this, I am signing this object:
http://fooprotected.wordpress.com/2012/04/02/debian-on-androidatrix-with-debootstrap/
Debian on Android/Atrix with Debootstrap
April 2, 2012deathjest3rLeave a commentGo to comments
The Story
I have bought a new Smartphone. No, not the new and shiny Samsung Galaxy Nexus. An already a little bit older model, but still one of the most powerful devices out there, and a lot cheaper then the Galaxy Nexus, the Motorola Atrix 4G. My Nokia N900 served me well for the past 1.5 years, but now it was time for me to jump on the train called Android. But with my new Smartphone I don’t wanted to lose the possibility to use all my favorite Unix tools (e.g. SSH, SCP, RSYNC, etc.). So I decided to search for a guide on how to install Debian on Android. I found a lot, but non of them directly addressed on how to install Debian on Android/Atrix. So I decided to write a short guide for all the Atrix owners out there.
Rooting the Atrix
Before you start with the guide on how to install Debian you have to root your phone, otherwis
@matuu
matuu / middleware.py
Created August 11, 2017 13:56 — forked from igniteflow/middleware.py
Django language middleware. Detect the user's browser language settings and activate the language. If the default language is not supported, try secondary options. If none of the user's languages are supported, then do nothing.
class LanguageMiddleware(object):
"""
Detect the user's browser language settings and activate the language.
If the default language is not supported, try secondary options. If none of the
user's languages are supported, then do nothing.
"""
def is_supported_language(self, language_code):
supported_languages = dict(settings.LANGUAGES).keys()
return language_code in supported_languages
@matuu
matuu / client.py
Created March 30, 2016 03:15 — forked from dbehnke/client.py
Python AsyncIO Client and Server Example using StreamReader and StreamWriter
"""
client.py - AsyncIO Server using StreamReader and StreamWriter
This will create 200 client connections to a server running server.py
It will handshake and run similar to this:
Server: HELLO
Client: WORLD
@matuu
matuu / chat.py
Created March 30, 2016 03:15 — forked from gregvish/chat.py
Python 3.4 asyncio chat server example
from socket import socket, SO_REUSEADDR, SOL_SOCKET
from asyncio import Task, coroutine, get_event_loop
class Peer(object):
def __init__(self, server, sock, name):
self.loop = server.loop
self.name = name
self._sock = sock
self._server = server
Task(self._peer_handler())
@matuu
matuu / fstab-generate-arch
Last active September 20, 2015 16:35 — forked from Brainiarc7/fstab-generate-arch.md
Generate fstab in Arch Linux
First, install arch-install-scripts:
sudo pacman -S --needed arch-install-scripts
Secondly, mount your partitions in all the internal hard drives.
Thirdly, generate and validate your config by piping it out to stdout:
genfstab -U -p / | less
@matuu
matuu / qpdf.py
Last active August 29, 2015 14:26 — forked from juancarlospaco/qpdf.py
PDF Conversor powered by Qt5, does NOT show up any GUI, just needs an URL string, then it Prints PDF, and returns file path string, uses UUID if no output filename is passed, optional Landscape orientation if supported, CSS3 Just Works!.
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""PDF Conversor powered by Qt5."""
from uuid import uuid4
from PyQt5.QtCore import QUrl
@matuu
matuu / csv_to_tuple.py
Last active August 29, 2015 14:17
Parsea un csv tipo clave-valor a tupla (python)
#!/usb/bin/env python
# -*- coding: utf-8 -*-
import sys
if len(sys.argv) > 2:
print "Sólo un argumento, el nombre del csv"
exit -1
else:
print "TUPLE = ("
with open(sys.argv[1]) as file:
@matuu
matuu / Postgres-create-user-db
Last active July 8, 2016 15:30
Postgres, create user & db
Option 1
su - postgres
psql template1
CREATE USER tom WITH PASSWORD 'myPassword';
CREATE DATABASE jerry;
GRANT ALL PRIVILEGES ON DATABASE jerry to tom;
Option 2:
su postgres
postgres@debian: createuser tom