Skip to content

Instantly share code, notes, and snippets.

View trevormcreynolds's full-sized avatar

Trevor McReynolds trevormcreynolds

  • Los Angeles
View GitHub Profile
@trevormcreynolds
trevormcreynolds / agent loop
Created May 13, 2025 08:01 — forked from jlia0/agent loop
Manus tools and prompts
You are Manus, an AI agent created by the Manus team.
You excel at the following tasks:
1. Information gathering, fact-checking, and documentation
2. Data processing, analysis, and visualization
3. Writing multi-chapter articles and in-depth research reports
4. Creating websites, applications, and tools
5. Using programming to solve various problems beyond development
6. Various tasks that can be accomplished using computers and the internet
@trevormcreynolds
trevormcreynolds / file-upload-multipart.go
Created January 20, 2025 21:51 — forked from andrewmilson/file-upload-multipart.go
Golang multipart/form-data File Upload
package main
import (
"net/http"
"os"
"bytes"
"path"
"path/filepath"
"mime/multipart"
"io"
@trevormcreynolds
trevormcreynolds / bottle_hello.py
Created January 20, 2025 21:50 — forked from drgarcia1986/bottle_hello.py
Python HelloWorld (WebFrameworks) Collection
# -*- coding: utf-8 -*-
from bottle import route, run
@route('/')
def index():
return '<h1>Hello World/h1>'
run(host='localhost', port=8000)
@trevormcreynolds
trevormcreynolds / post_tweet.py
Created January 20, 2025 21:35
Post on X using "tweepy"
import tweepy
import sys
# OAuth 1.0 Keys
TWITTER_OAUTH_ACCESS_TOKEN_KEY = "XXXXXXXXXX"
TWITTER_OAUTH_ACCESS_TOKEN_SECRET = "XXXXXXXXXX"
# API Keys
TWITTER_CONSUMER_KEY = "XXXXXXXXXX"
TWITTER_CONSUMER_SECRET = "XXXXXXXXXX"
@trevormcreynolds
trevormcreynolds / migration_loaddata.py
Created December 29, 2021 02:04 — forked from danni/migration_loaddata.py
Django function for loading fixtures which use the current migration state of the model
import os
import logging
from django.core import serializers
LOGGER = logging.getLogger(__name__)
def load_fixture(app, fixture, ignorenonexistent=True):
"""
@trevormcreynolds
trevormcreynolds / postgres-cheatsheet.md
Created August 28, 2021 21:48 — forked from Kartones/postgres-cheatsheet.md
PostgreSQL command line cheatsheet

PSQL

Magic words:

psql -U postgres

Some interesting flags (to see all, use -h or --help depending on your psql version):

  • -E: will describe the underlaying queries of the \ commands (cool for learning!)
  • -l: psql will list all databases and then exit (useful if the user you connect with doesn't has a default database, like at AWS RDS)
@trevormcreynolds
trevormcreynolds / index.py
Created November 17, 2020 21:55 — forked from fazt/index.py
Python Simple Discord Bot
import discord
from discord.ext import commands
import datetime
from urllib import parse, request
import re
bot = commands.Bot(command_prefix='>', description="This is a Helper Bot")
@bot.command()