Skip to content

Instantly share code, notes, and snippets.

View jdcaballerov's full-sized avatar
🇨🇴
Working from home

JDC jdcaballerov

🇨🇴
Working from home
  • Bucaramanga, Colombia
View GitHub Profile
@jdcaballerov
jdcaballerov / gist:55e39a326daf2b561df9358c2130f1ae
Created November 27, 2023 13:57 — forked from levelsio/gist:5bc87fd1b1ffbf4a705047bebd9b4790
Secret of Monkey Island: Amsterdam (by @levelsio) or how to create your own ChatGPT image+text-based adventure game
# 2023-11-27 MIT LICENSE
Here's the open source version of my ChatGPT game MonkeyIslandAmsterdam.com.
It's an unofficial image+text-based adventure game edition of Monkey Island in Amsterdam, my home town.
Please use it however you want. It'd be nice to see more ChatGPT-based games appear from this. If you get inspired by it, please link back to my X https://x.com/levelsio or this Gist so more people can do the same!
Send me your ChatGPT text adventure game on X, I'd love to try it!
@jdcaballerov
jdcaballerov / cf-worker.js
Created April 5, 2022 18:30 — forked from mkornatz/cf-worker.js
Cloudflare Workers CORS Proxy (supports websockets)
// We support the GET, POST, HEAD, and OPTIONS methods from any origin,
// and allow any header on requests. These headers must be present
// on all responses to all CORS preflight requests. In practice, this means
// all responses to OPTIONS requests.
const corsHeaders = {
"Access-Control-Allow-Origin": "*",
"Access-Control-Allow-Methods": "GET,HEAD,POST,OPTIONS",
"Access-Control-Max-Age": "86400",
}

How to setup a practically free CDN

I've been using [Backblaze][bbz] for a while now as my online backup service. I have used a few others in the past. None were particularly satisfactory until Backblaze came along.

It was - still is - keenly priced at a flat $5 (£4) per month for unlimited backup (I've currently got just under half a terabyte backed-up). It has a fast, reliable client. The company itself is [transparent about their operations][trans] and [generous with their knowledge sharing][blog]. To me, this says they understand their customers well. I've never had reliability problems and everything about the outfit exudes a sense of simple, quick, solid quality. The service has even saved the day on a couple of occasions where I've lost files.

Safe to say, I'm a happy customer. If you're not already using Backblaze, [I highly recommend you do][recommend].

Taking on the big boys with B2

#********************************************************************
# CONFIGURAGION FILE FOR ADCD Z/OS 1.10 SUMMER *
#********************************************************************
# FOR ALL THE LOADPARM OPTIONS VISIT: *
# http://dtsc.dfw.ibm.com/MVSDS/'HTTPD2.ADCD.GLOBAL.HTML(READ110S)' *
#********************************************************************
# CUSTOM LOADPARM OPTIONS *
# SA - LOADS ALL LIBRARIES AND STARTS UP AUTOMATION (JES2) *
# J3 - LOADS ALL LIBRARIES AND STARTS UP BASIC z/OS SYSTEM (JES3) *
#********************************************************************
org.gnome.desktop.wm.keybindings switch-group ['<Super>Above_Tab', '<Alt>Above_Tab']
org.gnome.desktop.wm.keybindings begin-resize ['<Alt>F8']
org.gnome.desktop.wm.keybindings switch-to-workspace-7 []
org.gnome.desktop.wm.keybindings begin-move ['<Alt>F7']
org.gnome.desktop.wm.keybindings move-to-side-w []
org.gnome.desktop.wm.keybindings move-to-corner-nw []
org.gnome.desktop.wm.keybindings move-to-workspace-10 []
org.gnome.desktop.wm.keybindings move-to-workspace-6 []
org.gnome.desktop.wm.keybindings move-to-workspace-right ['<Control><Shift><Alt>Right']
org.gnome.desktop.wm.keybindings always-on-top []
#!/usr/bin/perl
# credits:https://askubuntu.com/questions/26056/where-are-gnome-keyboard-shortcuts-stored
use strict;
my $action = '';
my $filename = '-';
for my $arg (@ARGV){
@jdcaballerov
jdcaballerov / models.py
Created June 3, 2020 17:05 — forked from jacobian/models.py
An example of using many-to-many "through" to augment m2m relationships. See http://www.quora.com/How-do-you-query-with-a-condition-on-a-ManyToMany-model-in-Django for context.
from django.db import models
class Person(models.Model):
name = models.CharField(max_length=200)
groups = models.ManyToManyField('Group', through='GroupMember', related_name='people')
class Meta:
ordering = ['name']
def __unicode__(self):
@jdcaballerov
jdcaballerov / fish_install.md
Created March 15, 2020 22:40 — forked from gagarine/fish_install.md
Install fish shell on macOS Mojave with brew

Installing Fish shell on MacOS

Fish is a smart and user-friendly command line (like bash or zsh). This is how you can nstall it on MacOS and make your defaul shell.

Note that you need the https://brew.sh/ package manager.

You can also download the fish app from their website. I do recomand using brew because update are easier.

Install Fish

@jdcaballerov
jdcaballerov / create_aws_lambda_layer_matplotlib.txt
Created November 11, 2019 22:47 — forked from ttor/create_aws_lambda_layer_matplotlib.txt
Create AWS Lambda Layer for Matplotlib (Python3.7)
sudo docker pull amazonlinux
sudo docker run -it amazonlinux:latest /bin/bash
# inside container
yum -y install python37 zip
python3 -m venv python
source python/bin/activate
pip3 install matplotlib
deactivate
rm -rf python/{bin,include,lib64,pyvenv.cfg} python/lib/python3.7/site-packages/{__pycache__,easy_install.py,numpy*,pip*,pkg_resources,setuptools*}
alias ick='ack -i --pager="less -R -S"'