Skip to content

Instantly share code, notes, and snippets.

View joac's full-sized avatar
🔥

Joaquín Sorianello joac

🔥
View GitHub Profile
watch "(curl -s https://www.buenosaires.gob.ar/coronavirus/vacunacion-covid-19/poblacion-general | grep -q '40 años') && echo 'Falta un poco...' || echo 'A anotarse!'"
@joac
joac / logs.ts
Last active May 6, 2021 14:19
Streaming on next
import { getSession } from 'next-auth/client';
import { NextApiRequest, NextApiResponse } from 'next';
export default async (req: NextApiRequest, res: NextApiResponse) => {
const { pod, container, env } = req.query;
const session = await getSession({ req });
if (!session) {
return res.status(403).end('Forbidden');
}
res.writeHead(200, {
import requests
import time
import telegram_send
import datetime
from collections import defaultdict
telegram_send.send(['Starting bot'])
known_data = defaultdict(list)
@joac
joac / pre-commit
Created April 13, 2016 13:51 — forked from mgaitan/pre-commit
How to automatically prepend git commit with the related JIRA's ticket ID
#!/usr/bin/env python
"""
no more embarrasing "removed pdb, sorry" commits
install
-------
save it as .git/hooks/pre-commit giving +x permission
"""

Keybase proof

I hereby claim:

  • I am joac on github.
  • I am joac (https://keybase.io/joac) on keybase.
  • I have a public key whose fingerprint is BBC8 9FAB 3910 FFAB A2F4 452C D47D 6094 4F4A EFAC

To claim this, I am signing this object:

import pygame
from pygame.locals import QUIT
from bluetooth import BluetoothSocket, BluetoothError, L2CAP
import thread, time
WIDTH = 800 #512
HEIGHT = 256 # 256 Don't change this one
#ADDRESS = '00:1F:32:8C:A7:B0' # Cambiar por la mac del wiimote que estan probando, la mac se averigua con el comando "hcitool scan"
#ADDRESS = '00:1E:35:DE:29:82' # Cambiar por la mac del wiimote que estan probando, la mac se averigua con el comando "hcitool scan"
ADDRESS = "00:18:00:2E:72:41"
dameLayer = "Precomp-B"
comp(dameLayer).layer("trakBoca").transform.position
dameLayer = "Precomp-B"
comp(dameLayer).layer("trakBoca").transform.position
@joac
joac / ClasePyPi.md
Last active December 18, 2015 07:49
Curso

PyPI y virtualenv

Como laburar con elementos de terceros usando pip

Tenemos que instalar las dependencias de debian

  • python-pip
  • python-virtualenv

Como no queremos mezclar las dependencias de nuestra aplicacion con las del sistema, vamos a crear un virtualenv:

/*"basado en lo que llego a entender
* Hay cuatro puntos p1, p2, p3, p4 de traking y el punto k
* considero:
* p1----p2
* | |
* | |
* p3----p4
* |
* |
* k