Skip to content

Instantly share code, notes, and snippets.

View thblckjkr's full-sized avatar
🎯
Focusing

Teo Gonzalez thblckjkr

🎯
Focusing
View GitHub Profile
@thblckjkr
thblckjkr / ReadME.md
Created April 28, 2021 05:05
Simple MySQL API

Prueba de que es posible realizar un servidor HTTP en python, sin utilizar Apache, Nginx o similares.

Sólamente utilizando un script de python, que incluye las librerías BaseHTTPRequestHandler y HTTPServer

Para correrlo, crear la base de datos correspondiente adjunta, y correr el script así

./server.py o python server.py

Nota: Requiere de Python3

@thblckjkr
thblckjkr / gantt.tex
Created May 15, 2020 02:00
A gantt chart on a tex document
\usepackage{pgfgantt}
% fix gantt colors
\usepackage{xcolor}
\colorlet{barblue}{blue}
\colorlet{groupblue}{green}
\section{Cronograma de Actividades}
\begin{ganttchart}[
canvas/.append style={fill=none, draw=black!5, line width=.75pt},
@thblckjkr
thblckjkr / aliases.sh
Last active June 11, 2021 05:34
Weeb aliases for shell
# A little list of aliases for weeb developers
# nya | Opens a file for edition
alias nya='nano'
# neko | Prints a file on terminal
alias neko='cat'
# onegai | Execute the previous command as sudo
alias onegai='echo sudo $(fc -ln -1) ; sudo $(fc -ln -1)'
@thblckjkr
thblckjkr / FilesSnapshot.xml
Created September 8, 2019 05:32
ketarin v1.8.10 - Passed - Package Tests Results
<?xml version="1.0" encoding="utf-8"?>
<fileSnapshot xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<files>
<file path="C:\ProgramData\chocolatey\lib\ketarin\Ketarin-1.8.10.zip.txt" checksum="ED275FCE334D3E26101161F4BF71D40E" />
<file path="C:\ProgramData\chocolatey\lib\ketarin\ketarin.nupkg" checksum="2DB374B1BC2BD627D0772E1EE795388C" />
<file path="C:\ProgramData\chocolatey\lib\ketarin\ketarin.nuspec" checksum="4099F31E7E0BDB13A1315DD6597032B9" />
<file path="C:\ProgramData\chocolatey\lib\ketarin\legal\LICENSE.txt" checksum="FFA10F40B98BE2C2BC9608F56827ED23" />
<file path="C:\ProgramData\chocolatey\lib\ketarin\legal\VERIFICATION.txt" checksum="1394839900CDD9D0F01D604A3778DFDE" />
<file path="C:\ProgramData\chocolatey\lib\ketarin\tools\chocolateyInstall.ps1" checksum="B7C1C7BB9A473B07B166CDE3D7F7B117" />
<file path="C:\ProgramData\chocolatey\lib\ketarin\tools\DiffieHellman.dll" checksum="234B9052AD2010604BCAE98C39672888" />
@thblckjkr
thblckjkr / UDPClient.java
Created September 8, 2019 05:25
Simple pair of sockets on Java.
/*
* I'm just making a proper docs of this program
* This was just to make things easier to me and a friend, but i think it does not hurt to share
* @thblckjkr [2019/09/07]
*/
// Se importan los paquetes
// https://docs.oracle.com/javase/10/docs/api/java/io/package-summary.html
import java.net.*; // DatagramSocket, DatagramPAcket, SocketException, InetAddress
@thblckjkr
thblckjkr / conkyrc
Last active September 28, 2019 06:21
Conky configuration
use_xft yes
xftfont 123:size=8
xftalpha 0.1
update_interval 2
total_run_times 0
# Windows definitions
own_window yes
own_window_type dock
own_window_transparent yes
import datetime
class matrix:
n = 3
A = []
B = []
C = []
def __init__(self, n):
self.n = n
self.fill()
@thblckjkr
thblckjkr / numbers.py
Created May 19, 2019 22:30
Just a simple python script for a homework
import math
times = [1000, 60000, 3600000, 86400000, 2592000000, 31104000000, 3110400000000]
for n in times:
print("\nCunando n= \t", n)
print ("lg(n)= \t\t", math.log(n, 2))
print ("sqr(n)= \t", math.sqrt(n))
print ("n lg(n)= \t", ( n *math.log(n, 2) ) )
print ("n ^2 = \t", n**2 )
print ("n ^3 = \t", n**3 )
#! /bin/bash
# You need to execute this bash file on tmux, to have an easy way to see the output
# then, just execute the script and have a daily report of the status
#
# Default ouput on $path/log.md can be readed by markdown and by a human
#
# Maybe you'll need to do some modifications
# Autor: Teo Gonzalez Calzada @thblckjkr
# Global variables
@thblckjkr
thblckjkr / verify.php
Created February 24, 2019 21:50
Verify google reCAPTCHA with PHP. Clean and universal function.
<?php
/*
Decided to put this function as a gist itself, taken from this great comment
https://gist.github.com/jonathanstark/dfb30bdfb522318fc819#gistcomment-2733991
*/
function validate_rechapcha($response){
// Verifying the user's response (https://developers.google.com/recaptcha/docs/verify)
$verifyURL = 'https://www.google.com/recaptcha/api/siteverify';
// Collect and build POST data