Skip to content

Instantly share code, notes, and snippets.

View teoruiz's full-sized avatar

Teo Ruiz teoruiz

View GitHub Profile
@diegomarino
diegomarino / _fable-audits.txt
Last active July 9, 2026 15:37
Fable Adversarial Reviews
# adversarial audit prompts - fetch & run
#
# This gist contains three generic audit prompts:
# - fable-audit-codebase.txt: codebase/implementation audit.
# - fable-audit-docs.txt: documentation audit.
# - fable-audit-process.txt: end-to-end workflow/process audit.
#
# These files are /goal specs. The launcher below only NAMES the file; the agent
# opens it with its own Read tool, so the ~4KB /goal size limit never touches the
# prompt body. Keep the launcher tiny and let the file on disk carry the detail.
@lorne-luo
lorne-luo / python_console_for_pycharm.py
Last active March 17, 2020 10:03
django_extensions' shell_plus for Pycharm's python console
# open Pycharm settings->Build,Execution,Deployment->Console->Django Console
# 1.add env var: DJANGO_SETTINGS_MODULE -> settings.settings
# 2.copy below into Starting script
# open preferences->keymap->search `Python Console`->create new shortcut `cmd + 3`
from pprint import pprint
from django_extensions.management.shells import import_objects
from django.core.management.color import no_style
from datetime import datetime
@0xjac
0xjac / private_fork.md
Last active July 11, 2026 02:53
Create a private fork of a public repository

The repository for the assignment is public and Github does not allow the creation of private forks for public repositories.

The correct way of creating a private frok by duplicating the repo is documented here.

For this assignment the commands are:

  1. Create a bare clone of the repository. (This is temporary and will be removed so just do it wherever.)

git clone --bare git@github.com:usi-systems/easytrace.git

@cecilemuller
cecilemuller / letsencrypt_2020.md
Last active February 25, 2026 03:40
How to setup Let's Encrypt for Nginx on Ubuntu 18.04 (including IPv6, HTTP/2 and A+ SSL rating)

How to setup Let's Encrypt for Nginx on Ubuntu 18.04 (including IPv6, HTTP/2 and A+ SLL rating)


Virtual hosts

Let's say you want to host domains first.com and second.com.

Create folders for their files:

@thomasst
thomasst / migrate-redis.py
Created May 14, 2015 18:26
Migrate Redis data on Amazon ElastiCache
"""
Copies all keys from the source Redis host to the destination Redis host.
Useful to migrate Redis instances where commands like SLAVEOF and MIGRATE are
restricted (e.g. on Amazon ElastiCache).
The script scans through the keyspace of the given database number and uses
a pipeline of DUMP and RESTORE commands to migrate the keys.
Requires Redis 2.8.0 or higher.

tmux shortcuts & cheatsheet

start new:

tmux

start new with session name:

tmux new -s myname
@shymonk
shymonk / customize-save-in-django-admin-inline-form.org
Last active February 5, 2026 18:38
How to customize save in django admin inline form?

Customize Save In Django Admin Inline Form

Background

This is a common case in django ORM.

from django.db import models

class Author(models.Model):
#!/usr/bin/env python
# Quick and dirty demonstration of CVE-2014-0160 by
# Jared Stafford (jspenguin@jspenguin.org)
# Modified so that it finds cookies
import sys
import struct
import socket
import time
import select
@tripu
tripu / Useful-glyphs.md
Last active October 29, 2018 07:37
Useful glyphs
@dypsilon
dypsilon / frontendDevlopmentBookmarks.md
Last active June 30, 2026 18:13
A badass list of frontend development resources I collected over time.