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) *
#********************************************************************
@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*}

Notes on Shadow Brokers EQGRP-LiT

credit: @GossiTheDog: "If you want to setup FUZZBUNCH (the Equation exploit framework) you need Win7 VM + Python 2.6 + Pywin 2.6, then python fb.py for shell"
h/t @x0rz @DEYCrypt @hackerfantastic

HOW 2 SETUP + INSTALL FUZZBUNCH & DANDERSPRITZ

context: https://steemit.com/shadowbrokers/@theshadowbrokers/lost-in-translation
writeup: https://www.trustedsec.com/blog/equation-group-dump-analysis-full-rce-win7-fully-patched-cobalt-strike/
decrypted files: https://github.com/x0rz/EQGRP_Lost_in_Translation

@jdcaballerov
jdcaballerov / fetch_page.py
Created July 29, 2016 23:58 — forked from Smerity/fetch_page.py
An example of fetching a page from Common Crawl using the Common Crawl Index
import gzip
import json
import requests
try:
from cStringIO import StringIO
except:
from StringIO import StringIO
# Let's fetch the Common Crawl FAQ using the CC index
resp = requests.get('http://index.commoncrawl.org/CC-MAIN-2015-27-index?url=http%3A%2F%2Fcommoncrawl.org%2Ffaqs%2F&output=json')
#List unique values in a DataFrame column
pd.unique(df.column_name.ravel())
#Convert Series datatype to numeric, getting rid of any non-numeric values
df['col'] = df['col'].astype(str).convert_objects(convert_numeric=True)
#Grab DataFrame rows where column has certain values
valuelist = ['value1', 'value2', 'value3']
df = df[df.column.isin(value_list)]