Skip to content

Instantly share code, notes, and snippets.

View joac's full-sized avatar
🔥

Joaquín Sorianello joac

🔥
View GitHub Profile
@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
"""
import requests
import time
import telegram_send
import datetime
from collections import defaultdict
telegram_send.send(['Starting bot'])
known_data = defaultdict(list)
@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, {
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!'"