Skip to content

Instantly share code, notes, and snippets.

View rafaelcalleja's full-sized avatar

Rafael Calleja rafaelcalleja

View GitHub Profile

Keybase proof

I hereby claim:

  • I am rafaelcalleja on github.
  • I am rafaelcalleja (https://keybase.io/rafaelcalleja) on keybase.
  • I have a public key ASAmJbEl3PdrEgpcAb_5KXB_Pg5MpbvByzCn8_Iq9UMPpAo

To claim this, I am signing this object:

@rafaelcalleja
rafaelcalleja / goshell.go
Created December 18, 2023 18:17 — forked from lee8oi/goshell.go
Running system commands interactively in Go using os/exec
package main
import (
"os"
"os/exec"
)
func Command(args ...string) {
cmd := exec.Command(args[0], args[1:]...)
cmd.Stdin, cmd.Stdout, cmd.Stderr = os.Stdin, os.Stdout, os.Stderr
@rafaelcalleja
rafaelcalleja / discord-verification-workarounds.md
Created October 24, 2023 15:50
Discord E-Mail & Phone Number/SMS Verification Workarounds

Discord E-Mail & Phone Number/SMS Verification Workarounds

Info

Useful links:

As some of these sites are a bit sketchy, make sure to keep privacy & security measures. Learn more here: https://www.privacyguides.org/en/desktop-browsers/

Phone

UPDATE - I now just use https://5sim.net and choose England as the country (it works the best for me)!

@rafaelcalleja
rafaelcalleja / evalmyoutput.sh
Created June 18, 2023 06:44 — forked from freman/evalmyoutput.sh
Re-create docker iptables rules
#!/bin/bash
echo "Recreating docker iptables rules and chains"
echo "iptables -N DOCKER"
echo "iptables -N DOCKER-ISOLATION"
echo "iptables -t nat -N DOCKER"
echo "iptables -A DOCKER-ISOLATION -j RETURN"
echo "iptables -A FORWARD -j DOCKER-ISOLATION"
echo "iptables -t nat -A PREROUTING -m addrtype -dst-type LOCAL -j DOCKER"
@rafaelcalleja
rafaelcalleja / chatgpt.md
Created May 18, 2023 18:28 — forked from veekaybee/chatgpt.md
Everything I understand about chatgpt

ChatGPT Resources

Context

ChatGPT appeared like an explosion on all my social media timelines in early December 2022. While I keep up with machine learning as an industry, I wasn't focused so much on this particular corner, and all the screenshots seemed like they came out of nowhere. What was this model? How did the chat prompting work? What was the context of OpenAI doing this work and collecting my prompts for training data?

I decided to do a quick investigation. Here's all the information I've found so far. I'm aggregating and synthesizing it as I go, so it's currently changing pretty frequently.

Model Architecture

@rafaelcalleja
rafaelcalleja / wireguard.conf
Created December 14, 2022 22:22 — forked from nealfennimore/wireguard.conf
Wireguard VPN - Forward all traffic to server
# ------------------------------------------------
# Config files are located in /etc/wireguard/wg0
# ------------------------------------------------
# ---------- Server Config ----------
[Interface]
Address = 10.10.0.1/24 # IPV4 CIDR
Address = fd86:ea04:1111::1/64 # IPV6 CIDR
PostUp = iptables -A FORWARD -i wg0 -j ACCEPT; iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE; ip6tables -A FORWARD -i wg0 -j ACCEPT; ip6tables -t nat -A POSTROUTING -o eth0 -j MASQUERADE # Add forwarding when VPN is started
PostDown = iptables -D FORWARD -i wg0 -j ACCEPT; iptables -t nat -D POSTROUTING -o eth0 -j MASQUERADE; ip6tables -D FORWARD -i wg0 -j ACCEPT; ip6tables -t nat -D POSTROUTING -o eth0 -j MASQUERADE # Remove forwarding when VPN is shutdown
@rafaelcalleja
rafaelcalleja / build.yml
Created July 27, 2022 10:27 — forked from alexanderbazo/build.yml
Github Actions: Build and Release Android-APK
name: Minimal Android CI Workflow
on:
push:
branches:
- master
tags:
- 'v*'
jobs:
@rafaelcalleja
rafaelcalleja / mysql_ip_address_info.sql
Created May 13, 2022 10:19 — forked from chris/mysql_ip_address_info.sql
Get list of IP addresses connected to MySQL DB, with their connection counts
SELECT
tmp.ipAddress,
-- Calculate how many connections are being held by this IP address.
COUNT( * ) AS numConnections,
-- For each connection, the TIME column represent how many SECONDS it has been in
-- its current state. Running some aggregates will give us a fuzzy picture of what
-- the connections from this IP address is doing.
FLOOR( AVG( tmp.time ) ) AS timeAVG,
@rafaelcalleja
rafaelcalleja / create-rabbitmq-exchange-queue-using-rest-api.sh
Created April 6, 2022 10:55 — forked from baybatu/create-rabbitmq-exchange-queue-using-rest-api.sh
Create RabbitMQ queue and exchange with binding using REST API
# create exchange
curl -i -u guest:guest -H "content-type:application/json" \
-XPUT -d'{"type":"fanout","durable":true}' \
http://localhost:15672/api/exchanges/%2f/my.exchange.name
# create queue
curl -i -u guest:guest -H "content-type:application/json" \
-XPUT -d'{"durable":true,"arguments":{"x-dead-letter-exchange":"", "x-dead-letter-routing-key": "my.queue.dead-letter"}}' \
http://localhost:15672/api/queues/%2f/my.queue