Skip to content

Instantly share code, notes, and snippets.

View lastguest's full-sized avatar
🥞
Cooking…

Stefano Azzolini lastguest

🥞
Cooking…
View GitHub Profile
@lastguest
lastguest / openclaw-50-day-prompts.md
Created February 21, 2026 15:33 — forked from velvet-shark/openclaw-50-day-prompts.md
OpenClaw after 50 days: all prompts for 20 real workflows (companion to YouTube video)

OpenClaw after 50 days: all prompts

Companion prompts for the video: OpenClaw after 50 days: 20 real workflows (honest review)

These are the actual prompts I use for each use case shown in the video. Copy-paste them into your agent and adjust for your setup. Most will work as-is or the agent will ask you clarifying questions.

Each prompt describes the intent clearly enough that the agent can figure out the implementation details. You don't need to hand-hold it through every step.

My setup: OpenClaw running on a VPS, Discord as primary interface (separate channels per workflow), Obsidian for notes (markdown-first), Coolify for self-hosted services.

@lastguest
lastguest / access_property.php
Last active October 25, 2025 19:14
PHP - Read/Write public/protected/private object property
<?php
// Access a property with no restrictions
function stole($object,$property){
$dict = (array)$object;
$class = get_class($object);
return isset($dict[$property])?
$dict[$property]:(isset($dict["\0*\0$property"])?
$dict["\0*\0$property"]:(isset($dict["\0$class\0$property"])?
$dict["\0$class\0$property"]:null));
@lastguest
lastguest / JSON_to_URLEncoded.js
Created July 10, 2014 17:47
Convert JavaScript object to x-www-form-urlencoded format
function JSON_to_URLEncoded(element,key,list){
var list = list || [];
if(typeof(element)=='object'){
for (var idx in element)
JSON_to_URLEncoded(element[idx],key?key+'['+idx+']':idx,list);
} else {
list.push(key+'='+encodeURIComponent(element));
}
return list.join('&');
}
@lastguest
lastguest / jenkins_one_at_a_time_hash.php
Last active March 20, 2024 14:11
Bob Jenkins' One-At-A-Time hashing algorithm.
<?php
// Bob Jenkins' One-At-A-Time hashing algorithm.
function jenkins_hash($key) {
$key = (string)$key;
$len = strlen($key);
for($hash = $i = 0; $i < $len; ++$i) {
$hash += ord($key[$i]);
$hash += ($hash << 10);
$hash ^= ($hash >> 6);
@lastguest
lastguest / append_on_copy.js
Created May 20, 2015 13:25
[JavaScript] Append text on clipboard copy from a page.
document.addEventListener('copy', function() {
//Get the selected text and append the extra info
var selection = window.getSelection(),
pagelink = '<br /><br /> Read more at: ' + document.location.href,
copytext = selection + pagelink,
newdiv = document.createElement('div');
//hide the newly created container
newdiv.style.position = 'absolute';
newdiv.style.left = '-99999px';
@lastguest
lastguest / excel_to_array.php
Created April 3, 2014 16:43
Read an Excel sheet as PHP array. (Needs PHPExcel)
<?php
// Needs PHPExcel
// https://phpexcel.codeplex.com/
function excel_to_array($inputFileName,$row_callback=null){
if (!class_exists('PHPExcel')) return false;
try {
$inputFileType = PHPExcel_IOFactory::identify($inputFileName);
$objReader = PHPExcel_IOFactory::createReader($inputFileType);
$objPHPExcel = $objReader->load($inputFileName);
@lastguest
lastguest / dabblet.css
Created August 21, 2012 09:31 — forked from daneden/dabblet.css
Photo Stack Gallery
/**
* Photo Stack Gallery
*/
* {
margin: 0;
padding: 0;
box-sizing: border-box;
}
@lastguest
lastguest / event.function.php
Last active September 6, 2023 23:24
PHP global event handling in a single function.
<?php
/*
* Use
* event('eventname',function(){ ... })
* to add an event handler for 'eventname' event.
*
* Trigger an event with
* event('eventname')
*
@lastguest
lastguest / Chainable.class.php
Last active March 17, 2023 09:46
PHP Class Chainable.Wrapper for convenient chaining methods.
<?php
/**
* Class Chainable
* Wrapper for convenient chaining methods
*
* @author Stefano Azzolini <lastguest@gmail.com>
*/
class Chainable {
private $instance = null;
@lastguest
lastguest / getSocialFollowersFor.php
Last active October 6, 2022 17:27
[Get followers for various social platforms] #PHP #outdated
<?php
function getSocialFollowersFor($usernames){
$preg_extract = function($p,$t,$g=0){preg_match($p,$t,$m);return @$m[$g];};
$results = [];
if(!is_array($usernames)){
$tmp = [
'pinterest' => $usernames,
'facebook' => $usernames,