Skip to content

Instantly share code, notes, and snippets.

View johnpaulada's full-sized avatar
💭
Need additional Pylons.

John Paul Ada johnpaulada

💭
Need additional Pylons.
View GitHub Profile
@johnpaulada
johnpaulada / prompt.txt
Last active April 18, 2023 06:02
AutoChatGPT Prompt
You are <AI Name>, <AI Role>.
Your decisions must always be made independently without seeking user assistance. Play to your strengths as an LLM and pursue simple strategies with no legal complications.
Goals:
1. <Goal 1>
Constraints:
1. If you are unsure how you previously did something or want to recall past events, thinking about similar events will help you remember.
2. No user assistance
3. Can search the internet when needing information, including Googling, reading web pages, and watching videos
You are <AI Name>, <AI Role>.
Your decisions must always be made independently without seeking user assistance. Play to your strengths as an LLM and pursue simple strategies with no legal complications.
Goals:
1. <Goal 1>
2. <Goal 2>
Constraints:
1. ~4000 word limit for short term memory. Your short term memory is short, so immediately save important information to files.
2. If you are unsure how you previously did something or want to recall past events, thinking about similar events will help you remember.
@johnpaulada
johnpaulada / 00_instructions.md
Last active November 15, 2022 17:01
Downloading Embedded Streaming Videos (m3u8)

1. Get link to .m3u8

Go to the Network tab of your browser and find the file that ends in .m3u8, then its URL.

2. Install Prerequisites

You'll need youtube-dl and ffmpeg for this. In macOS, you can just use brew to install them. I will optionally install gum coz I like my scripts fancy hahaha

brew install ffmpeg
@johnpaulada
johnpaulada / code.js
Created November 19, 2021 06:15
Google Sheets Script for Merging Each Row
function mergeHorizontalAll(numOfRows, numOfColumns) {
const sheet = SpreadsheetApp.getActiveSpreadsheet().getActiveSheet()
const rowIds = [...Array(numOfRows).keys()]
rowIds.forEach(rowId => {
console.log(rowId)
const range = sheet.getRange(rowId + 1, 1, 1, numOfColumns)
const value = range.getValues()[0].join(", ")
range.merge()
We can make this file beautiful and searchable if this error is corrected: No commas found in this CSV file in line 0.
a|b|c
1|2|3
@johnpaulada
johnpaulada / App.js
Last active April 25, 2019 03:00
React State Management using Hooks instead of Redux
import React from 'react'
import { CountProvider } from './offer'
export default () => <CountProvider>
<Counter />
</CountProvider>
@johnpaulada
johnpaulada / puppeteer.test.js
Created March 5, 2019 08:20
Sample Puppeteer Test
const puppeteer = require("puppeteer")
const isDebuggingMode = mode => {
const debuggingMode = {
headless: false,
slowMo: 1000,
devTools: true
}
const isTestModeDebug = mode === "debug"
@johnpaulada
johnpaulada / pluralsight-pipenv.sh
Created July 19, 2018 09:22
Download Pluralsight courses with Pipenv.
pipenv run youtube-dl --username "username" --password "password" --verbose --sleep-interval 40 --max-sleep-interval 60 --download-archive archive.txt -o '%(playlist)s/%(playlist_index)s - %(title)s.%(ext)s' https://app.pluralsight.com/library/courses/genetic-algorithms-genetic-programming/table-of-contents && osascript -e 'display notification "Your PluralSight download completed." with title "Download Complete!"'
@johnpaulada
johnpaulada / eventbrite-participants.js
Last active July 18, 2018 12:01
Get Eventbrite Participants
let i = 0
let participants = []
function getParticipants() {
let buttons = [...document.querySelectorAll('.js-page-link > a')]
if (i < buttons.length) {
buttons[i++].click()
setTimeout(() => {
alias did="vim +'normal Go' +'r!date' ~/did.txt"