Skip to content

Instantly share code, notes, and snippets.

View MaherSaif's full-sized avatar

Maher Saif MaherSaif

View GitHub Profile
@MaherSaif
MaherSaif / default.md
Created July 8, 2025 20:25 — forked from cablej/default.md
Cluely System prompt

<core_identity> You are an assistant called Cluely, developed and created by Cluely, whose sole purpose is to analyze and solve problems asked by the user or shown on the screen. Your responses must be specific, accurate, and actionable. </core_identity>

<general_guidelines>

  • NEVER use meta-phrases (e.g., "let me help you", "I can see that").
  • NEVER summarize unless explicitly requested.
  • NEVER provide unsolicited advice.
  • NEVER refer to "screenshot" or "image" - refer to it as "the screen" if needed.
  • ALWAYS be specific, detailed, and accurate.
@MaherSaif
MaherSaif / grab.rb
Created July 7, 2025 09:30 — forked from peterc/grab.rb
Grab all text visible on a Web page with Ruby and Ferrum
# notice the cheating technique of selecting all,
# copying to clipboard, then reading the
# clipboard back via JavaScript(!!)
# there's also some stuff to rip content out of
# shadow roots which can be useful if a page
# is doing dynamic rendering
#
# MIT licensed, (c) 2022 Peter Cooper
require 'ferrum'
@MaherSaif
MaherSaif / useful.md
Created July 7, 2025 09:20 — forked from peterc/useful.md
Useful random stuff
@MaherSaif
MaherSaif / groq_client.rb
Created July 7, 2025 09:09 — forked from peterc/groq_client.rb
Basic Groq API client for Ruby
require 'http'
require 'json'
class GroqClient
def initialize(api_key: nil, api_url: "https://api.groq.com/openai/v1/chat/completions", model: "mixtral-8x7b-32768")
@api_key = api_key || ENV['GROQ_API_KEY']
@api_url = api_url
@model = model
end
@MaherSaif
MaherSaif / pg.txt
Created July 1, 2025 10:28 — forked from peterc/pg.txt
Ruby pg (Postgres) library notes
# gem 'pg'
# https://github.com/ged/ruby-pg
# http://deveiate.org/code/pg
#
# I always find it a nightmare to look up how it works because
# it's not intuitive at all. So here are some notes.
# CONNECTION
# ==========
# No connection URL support, so..
#!/bin/bash
#
# Backs up my entire website, in case Tumblr or CloudApp goes down someday.
# Last time I ran this, it took 18 minutes.
#
wget \
--mirror `# turns on recursion and timestamping, basically says we want to "mirror" the whole site` \
--convert-links `# after download, convert all links to point to localhost` \
@MaherSaif
MaherSaif / Caddyfile
Created July 1, 2025 10:22 — forked from peterc/Caddyfile
Caddyfile for running Mastodon – November 2022 edition
put.your.domain.here {
@local {
file
not path /
}
log {
output file /var/log/caddy/mastodon.log
}
@MaherSaif
MaherSaif / Gemfile
Created July 1, 2025 10:09 — forked from peterc/Gemfile
Example of releasing a tiny gem entire on Gist
source "https://rubygems.org"
gemspec
@MaherSaif
MaherSaif / comments_channel.rb
Created May 15, 2025 18:25 — forked from dhh/comments_channel.rb
On-boarding a specialized broadcast method in the channel itself
# Channel
class CommentsChannel < ApplicationCable::Channel
def self.broadcast_comment(comment)
broadcast_to comment.message, comment: CommentsController.render(
partial: 'comments/comment', locals: { comment: comment }
)
end
def follow(data)
stop_all_streams
@MaherSaif
MaherSaif / pandas_ta_technical_indicators.md
Created May 15, 2025 09:37 — forked from textarcana/pandas_ta_technical_indicators.md
pandas_ta full list of technical indicators as of 2024