Skip to content

Instantly share code, notes, and snippets.

View morenoh149's full-sized avatar
💭
Working from 🛰

Harry Moreno morenoh149

💭
Working from 🛰
View GitHub Profile

If AI removes labor as the main driver of income and identity, then you’re not really comparing “capitalism vs socialism” anymore.

You’re looking at a deeper shift:

a transition from labor-based status systems → to ownership, access, and attention-based status systems

That changes everything.

@morenoh149
morenoh149 / gmail_imap_python3.py
Last active March 9, 2026 04:57 — forked from robulouski/gmail_imap_example.py
Basic example of using Python3 and IMAP to read emails in a gmail folder/label. Remove legacy email.header api use
#!/usr/bin/env python
#
# Basic example of using Python3 and IMAP to read emails in a gmail folder/label.
# Remove legacy email.header api use.
import sys
import imaplib
import getpass
import email
import datetime
@morenoh149
morenoh149 / django-compose-migrate.yaml
Last active October 30, 2024 23:16
This focuses on the webserver and the migrate task. It is based on https://github.com/cookiecutter/cookiecutter-django
django: &django
build:
context: .
dockerfile: ./Dockerfile.dev
image: local_django
container_name:local_django
depends_on:
- django_migrate
- db
volumes:
Setting client expectations
This is the first lesson for The freelancer’s guide to good jobs & great pay.
Many years ago, a woman emailed to ask if I could build her new website. She
had heard about my work through a friend, saw my name listed on other websites,
and gushed about my portfolio.
She clearly wanted to work with me and offered to pay half the project fee
upfront, just so we could skip all the formalities and start designing. It
@morenoh149
morenoh149 / example.ts
Created June 6, 2024 19:36
typesript, dealing with accumulating outside scope
/*
error
Line 6: Char 14: error TS2448: Block-scoped variable 'res' used before its declaration.
*/
/* code */
function longestCommonSubsequence(arrays: number[][]): number[] {
// have a ptr for each array
let res = new Set();
let setA = new Set<number>(arrays[0]);
@morenoh149
morenoh149 / mysql.sql
Last active November 29, 2023 11:44
role based access control schemas in mysql, postgres and sqlite
/*
* Create Tables
*/
CREATE TABLE IF NOT EXISTS `PREFIX_permissions` (
`ID` int(11) NOT NULL auto_increment,
`Lft` int(11) NOT NULL,
`Rght` int(11) NOT NULL,
`Title` char(64) NOT NULL,
`Description` text NOT NULL,
#
# Generated automatically from man.conf.in by the
# configure script.
#
# man.conf from man-1.6c
#
# For more information about this file, see the man pages man(1)
# and man.conf(5).
#
# This file is read by man to configure the default manpath (also used
@morenoh149
morenoh149 / models.py
Last active July 19, 2023 09:18
Django model method mocking
class Blog(django.model):
name = models.CharField(null=False, max_length=64)
def list_articles(self):
return [
{'body': 'abcdefg'},
{'body': 'abcdefg'},
{'body': 'abcdefg'},
]
@morenoh149
morenoh149 / django_settings.py
Last active January 17, 2023 15:17
django ignore db errors in sentry
# sentry docs for filtering errors
# https://docs.sentry.io/platforms/python/guides/django/configuration/filtering/#event-hints
from django.urls import reverse_lazy
from django.db.utils import InterfaceError as djangoDbInterfaceError
...
def before_send(event, hint):
if 'exc_info' in hint:
exc_type, exc_value, tb = hint['exc_info']
<ion-view>
<ion-header-bar align-title="center" class="bar-dark">
<div class="buttons">
<button class="button button-icon icon ion-close" ng-click="goHome()"></button>
</div>
<h1 class="title">crop</h1>
</ion-header-bar>
<!--
<div class="header-padding"></div>
-->