Skip to content

Instantly share code, notes, and snippets.

View jschwindt's full-sized avatar

Juan Schwindt jschwindt

View GitHub Profile
@jschwindt
jschwindt / Caddyfile
Last active March 21, 2024 00:35
Caddyfile with Cloudflare TLS certificate generation
(common_directives) {
tls {$CLOUDFLARE_EMAIL} {
dns cloudflare {env.CLOUDFLARE_API_TOKEN}
}
encode gzip
}
{$NTFY_BASE_URL} {
import common_directives
reverse_proxy ntfy:8000
#!/usr/bin/env -S python -u
# pip install openai-whisper
# ./find_show_start.py lavenganza_2023-04-14.mp3-start.mp3
import whisper
import sys
import re
lvst = re.compile("la venganza ser[aá] terrible", re.IGNORECASE)

Keybase proof

I hereby claim:

  • I am jschwindt on github.
  • I am juanschw (https://keybase.io/juanschw) on keybase.
  • I have a public key ASDfkn4ff7S_BKWUXmqw6EgyOCEDsaxtCuz4OJZjUghZRwo

To claim this, I am signing this object:

server {
listen 80;
server_name kartoffel.example.org;
keepalive_timeout 5;
root /var/www/kartoffel/current/public;
access_log /var/log/nginx/kartoffel.access.log;
server {
client_max_body_size 30M;
server_name sistema.example.com.ar;
# ~2 seconds is often enough for most folks to parse HTML/CSS and
# retrieve needed images/icons/frames, connections are cheap in
# nginx so increasing this is generally safe...
keepalive_timeout 5;
net_input = Input(shape=(128, 87, 1))
def inception_block(input_layer,filters=64):
tower_1 = Conv2D(filters, (1,1), padding='same', activation='relu')(input_layer)
tower_1 = Conv2D(filters, (3,3), padding='same', activation='relu')(tower_1)
tower_2 = Conv2D(filters, (1,1), padding='same', activation='relu')(input_layer)
tower_2 = Conv2D(64, (5,5), padding='same', activation='relu')(tower_2)
tower_3 = MaxPooling2D((3,3), strides=(1,1), padding='same')(input_layer)
tower_3 = Conv2D(filters, (1,1), padding='same', activation='relu')(tower_3)
output = concatenate([tower_1, tower_2, tower_3], axis = 3)
@jschwindt
jschwindt / brands.js.coffee
Last active September 9, 2016 19:27
Actualización de combo de modelos cuando cambia la marca
jQuery ($) ->
$('#car_brand_id').change ->
$.getJSON "/brands/#{ $(this).val() }/models.json", (data) ->
items = [ '<option value=""> </option>' ]
$.each data, (key, val) ->
items.push("<option value='#{ val.id }'>#{val.name}</option>")
$('#car_model_id').html(items.join(''))
@jschwindt
jschwindt / gist:6902596
Created October 9, 2013 14:54
HAProxy with SSL/TLS support
global
log 127.0.0.1 local0
log 127.0.0.1 local1 notice
maxconn 4096
user haproxy
group haproxy
daemon
stats socket /var/run/haproxy.sock
defaults
@jschwindt
jschwindt / _6380.conf
Created August 22, 2013 19:58
Ubuntu 12.04 startup script for multiple Redis servers in the same real server
slaveof 10.10.10.10 6380
@jschwindt
jschwindt / gist:701920
Created November 16, 2010 15:17
Cómo hacer ssh en servidores que están detrás de otro o que sólo se puede acceder desde cierta IP
# Supongamos que tenemos que acceder por SSH a 'backend_server' pero sólo tenemos acceso
# desde 'frontend_sever', entonces configuramos ~/.ssh/config de la siguiente forma:
Host frontend_sever
HostName x.y.z.w # IP o nombre del server
User myusername
Host backend_server
HostName a.b.c.d # IP o nombre del backend_server, puede ser una 10.b.c.d por ejemplo
User username