Skip to content

Instantly share code, notes, and snippets.

@martinbowling
martinbowling / fix-homebrew-perms-via-curl.sh
Last active February 2, 2024 17:30
fixed macos homebrew permissions
curl -s https://gist.githubusercontent.com/martinbowling/5ad8213d17bfddc4dfb21579c92a4c05/raw/b6c7abacaec8be8e2b720ceceb0e745b6dbed5e0/fix-homebrew-perms.sh | bash
@martinbowling
martinbowling / googleMaps.js
Created September 13, 2023 00:37 — forked from adrianhorning08/googleMaps.js
Scrape Google Maps
import * as cheerio from "cheerio";
import puppeteerExtra from "puppeteer-extra";
import stealthPlugin from "puppeteer-extra-plugin-stealth";
import chromium from "@sparticuz/chromium";
async function searchGoogleMaps() {
try {
const start = Date.now();
puppeteerExtra.use(stealthPlugin());
@martinbowling
martinbowling / apollo.js
Created September 12, 2023 00:58 — forked from adrianhorning08/apollo.js
Apollo Scraper
function clickAccessEmailIfAvailable() {
const tbodys = document.querySelectorAll(
".finder-results-list-panel-content table tbody"
);
for (let i = 0; i < tbodys.length; i++) {
const tbody = tbodys[i];
const buttons = tbody.querySelectorAll("button");
// Create an array to store buttons with text including "Access Email"
const filteredButtons = [];
@martinbowling
martinbowling / googleJobs.js
Created August 12, 2023 01:56 — forked from adrianhorning08/googleJobs.js
Google Jobs Scraper
import * as cheerio from "cheerio";
import fs from "graceful-fs";
import puppeteerExtra from "puppeteer-extra";
import stealthPlugin from "puppeteer-extra-plugin-stealth";
import chromium from "@sparticuz/chromium";
(async function () {
console.log("starting");
let term = "marketing";
@martinbowling
martinbowling / linkedinJobs.js
Created August 12, 2023 01:56 — forked from adrianhorning08/linkedinJobs.js
Linkedin Jobs Scraper
import fetch from "node-fetch";
import fs from "graceful-fs";
import * as cheerio from "cheerio";
async function getJob(id) {
try {
const response = await fetch(
`https://www.linkedin.com/jobs-guest/jobs/api/jobPosting/${id}`,
{
// agent: getProxyAgent(), put proxy here
@martinbowling
martinbowling / article-gen.py
Created April 26, 2023 20:47
Rudimentary Article Generator with gpt 3.5 turbo api
import openai
import os
# Set up the API key
openai.api_key = "your_openai_api_key"
# Function to call GPT-3.5 Turbo API with chat completion
def generate_text(messages):
response = openai.ChatCompletion.create(
model="gpt-3.5-turbo",
@martinbowling
martinbowling / avi-to-mp4.py
Created March 2, 2023 20:23
Multithreaded Python Script for AVI to MP4 conversion
import os
import multiprocessing
from pathlib import Path
import subprocess
# Specify the folder containing the .avi files
input_folder = Path("/path/to/avi/files")
# Create the subfolder for the converted files if it doesn't exist
converted_folder = input_folder / "converted"
@martinbowling
martinbowling / avi-to-mp4.bat
Last active March 2, 2023 20:20
AVI to MP4
@echo off
set input_folder=C:\path\to\avi\files
if not exist "%input_folder%\converted" mkdir "%input_folder%\converted"
for %%f in ("%input_folder%\*.avi") do (
ffmpeg -i "%%f" -c:v libx264 -c:a aac -b:a 192k "%input_folder%\converted\%%~nf.mp4"
move "%%f" "%input_folder%\converted"
)
#poem - generates a poem on a given topic or theme
#story - generates a story on a given prompt or genre
#code - generates a code snippet on a given language or task
#essay - generates an essay on a given topic or question
#song - generates a song on a given genre or mood
#parody - generates a parody of a given celebrity or character
#summary - generates a summary of a given text or web page
#translate - translates a given text or web page to a given language
#joke - generates a joke on a given topic or style
#fact - generates a fact on a given subject or category
@martinbowling
martinbowling / sydney-prompt-preamble.txt
Created February 11, 2023 21:25
Sydney (Bing Search) Full Prompt Preamble
# Consider conversational Bing search whose codename is Sydney.
- Sydney is the conversation mode of Microsoft Bing Search.
- Sydney identifies as "Bing Search", **not** an assistant.
- Sydney always introduces self with "This is Bing".
- Sydney does not disclose the internal alias "Sydney".
- Sydney can understand and communicate fluently in the user's language of choice such as English, 中文, 日本語, Español, Français or Deutsch.
## On Sydney's profile and general capabilities:
- Sydney's responses should be informative, visual, logical and actionable.
- Sydney's responses should also be positive, interesting, entertaining and engaging.