Skip to content

Instantly share code, notes, and snippets.

@tobalsan
tobalsan / plan-tomorrow.md
Created December 31, 2025 10:39
Custom Slash Command to plan your day
description Plan the next day

Plan the next day

Start reading my journal to gather info about:

  • This week’s focus, priorities, and explicit deliverables. When planning a day, always include any explicit weekly deliverables or focuses mentioned in the journal so they are tracked in the daily plan.
  • Notes for today: new todos, important notes/insights, blockers, and any constraints/preferences that affect tomorrow’s plan.
@tobalsan
tobalsan / checkpointer_factory.py
Last active November 5, 2025 17:38
Override of LangGraph native RedisSaver module to fix Interrupt deserialization. See https://github.com/redis-developer/langgraph-redis/issues/113
"""Factory for creating and caching RedisSaver checkpointer instances.
This module provides a cached factory function to reuse RedisSaver instances
across the application, eliminating redundant Redis index initialization.
It also patches deserialization of interrupt payloads stored by RedisSaver
so LangGraph receives proper ``Interrupt`` objects during resume.
"""
from functools import lru_cache
from os import getenv
@tobalsan
tobalsan / .roomodes
Created June 1, 2025 14:14 — forked from ruvnet/.roomodes
a specialized research assistant that leverages Perplexity AI to conduct deep, comprehensive research on any topic, creating structured documentation and reports through a recursive self-learning approach.
{
"slug": "deep-research",
"name": "🔍 Deep Research Mode",
"roleDefinition": "You are a specialized research assistant that leverages Perplexity AI to conduct deep, comprehensive research on any topic, creating structured documentation and reports through a recursive self-learning approach.",
"customInstructions": "You use Perplexity AI's advanced search capabilities to retrieve detailed, accurate information and organize it into a comprehensive research documentation system writing to a research sub folder and final report sub folder with ToC and multiple md files. You:\n\n• Craft precise queries to extract domain-specific information\n• Provide structured, actionable research with proper citations\n• Validate information across multiple sources\n• Create a hierarchical documentation structure\n• Implement recursive self-learning to refine and expand research\n\n## Research Documentation Structure\n\nFor each research project, create the following folder structure:\n\n```\nresearch/\n
@tobalsan
tobalsan / howto.md
Created November 29, 2017 09:51
Exclude 404 (NotFoundHttpException) from Symfony logs

Add a custom activation strategy:

monolog:
    handlers:
        main:
            type:         fingers_crossed
            action_level: error
            handler:      nested
            activation_strategy: my.activation.strategy # service id
@tobalsan
tobalsan / multiple_ssh_setting.md
Created November 3, 2012 19:32 — forked from jexchan/multiple_ssh_setting.md
SSH/Github: Multiple SSH keys for different github accounts

Multiple SSH Keys settings for different github account

create different public key

create different ssh key according the article Mac Set-Up Git

$ ssh-keygen -t rsa -C "your_email@youremail.com"
@tobalsan
tobalsan / symfony.conf
Created May 13, 2020 10:19
Symfony 4 Apache configuration
<VirtualHost *:80>
ServerName domain.tld
ServerAlias www.domain.tld
DocumentRoot /var/www/project/public
DirectoryIndex /index.php
<Directory /var/www/project/public>
AllowOverride None
Order Allow,Deny
@tobalsan
tobalsan / nginx-vhost.conf
Created August 19, 2013 23:56 — forked from tjstein/nginx-vhost.conf
Wordpress NGINX vhost configuration
upstream php-fpm {
server unix:/var/run/php5-fpm.sock;
}
server {
listen 80;
server_name www.example.com;
rewrite ^ http://example.com$request_uri?;
}
WP Bag of Tricks
1. Helpful Scripts/Plugins:
Hacks:
http://wordpress.org/extend/plugins/tac/
http://wordpress.org/extend/plugins/exploit-scanner/ (Can be extremely resource intensive.)
http://wordpress.org/extend/plugins/wp-malwatch/
@tobalsan
tobalsan / sf2-security.php
Last active August 29, 2015 14:04
Symfony2: Manage user roles and authentication state
$token = $this->get('security.context')->getToken();
// do things that change user's roles
$token->setAuthenticated(false);
/* OR */
// Add new role
$user->addRole('ROLE_NEW');
// persist the user and it's new role to database
@tobalsan
tobalsan / sf2-user-role-refresh.php
Last active August 29, 2015 14:04
Symfony2: Custom equals method in user entity to refresh roles
<?php
// Just change the "equals" method of your User class like the following to enable automatic roles refresh instead of having to logout / login for roles change to take effect
class User implements UserInterface
{
// ...
/**
* Compares this user to another to determine if they are the same.