Skip to content

Instantly share code, notes, and snippets.

View macagua's full-sized avatar
🏠
Working from home

Leonardo J. Caballero G. macagua

🏠
Working from home
View GitHub Profile
@macagua
macagua / debug-zodb-bloat.rst
Created January 9, 2021 06:33 — forked from lrowe/debug-zodb-bloat.rst
Debugging ZODB bloat [2005]

Warning

This was written in 2005 so may be out of date. Originally published on the old Plone documentation section: https://plone.org/documentation/kb-old/debug-zodb-bloat/

About

Having spent a lot of time tracking down the cause of ZODB bloat in an Archetypes application I thought I'd share my experience in case it was useful to anyone else.

Step 1: Analysis

Keybase proof

I hereby claim:

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

To claim this, I am signing this object:

@macagua
macagua / Python_Cache_Packages_Conda.txt
Last active March 30, 2022 22:18
[TIP] When there is Internet latency and requires installing python packages by conda tool but the installation failed, then you can prevent conda from re-downloading previously downloaded packages, running this command
mkdir -p ~/.conda/pkgs && printf 'pkgs_dirs:\n - ~/.conda/pkgs\n' >> ~/.condarc
@macagua
macagua / README.rst
Last active September 1, 2019 00:03
Returning CSV format from django-rest-framework
@macagua
macagua / my_db-ddl.sql
Created June 23, 2019 21:48
DDL (Data Definition Language) syntax example for a MySQL Database
-- ddl my_db
-- create database my_db;
-- use my_db;
create table person(
id int not null,
name varchar(50),
lastname varchar (40),
age varchar (1),
@macagua
macagua / hello.php
Created June 23, 2019 14:43
Hello world PHP CLI example
<?php
if($argc != 2) {
echo "Use: php hello.php [name].\n";
exit(1);
}
$name = $argv[1];
echo "Hello, $name\n";
@macagua
macagua / info.php
Created June 23, 2019 13:04
phpinfo example for show details information about PHP's configuration
<?php phpinfo(); ?>
@macagua
macagua / README.rst
Last active October 4, 2018 16:57
HTTP Server request and response for GET and POST verbs demostration with Python 3

README

To use this:

  1. Install httpie via pip inside a virtualenv, executing the following command: pip install httpie
  2. Execute HTTP Server script on your machine, executing the following command: python3 my-httpserver.py
  3. Test a HEAD request using http script from httpie package,
@macagua
macagua / README.rst
Last active October 4, 2018 16:42
HTTP Server request and response for GET and POST verbs demostration with Python 2

README

To use this:

  1. Install httpie via pip inside a virtualenv, executing the following command: pip install httpie
  2. Execute HTTP Server script on your machine, executing the following command: python3 my-httpserver.py
  3. Test a HEAD request using http script from httpie package,
@macagua
macagua / index.html
Created October 2, 2018 14:12
AdminLTE 2 Dashboard Demo
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title>AdminLTE 2 | Dashboard</title>
<!-- Tell the browser to be responsive to screen width -->
<meta content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no" name="viewport">
<!-- Bootstrap 3.3.7 -->
<link rel="stylesheet" href="https://adminlte.io/themes/AdminLTE/bower_components/bootstrap/dist/css/bootstrap.min.css">