This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env -S bash -c "docker run -p 8080:8080 -it --rm \$(docker build --progress plain -f \$0 . 2>&1 | tee /dev/stderr | grep -oP 'sha256:[0-9a-f]*')" | |
# syntax = docker/dockerfile:1.4.0 | |
FROM node:20 | |
WORKDIR /root | |
RUN npm install sqlite3 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
set -g TMUX_PLUGIN_MANAGER_PATH "$GITHUB_REPO_ROOT" | |
set -g @plugin 'tmux-plugins/tpm' | |
set -g @plugin 'wenijinew/glamour.tmux' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"model": "gpt-3.5-turbo-0613", | |
"function_call": { | |
"name": "query_enrichment" | |
}, | |
"messages": [ | |
{ | |
"role": "user", | |
"content": "Write a newsletter." | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const { encode } = require('@nem035/gpt-3-encoder') | |
exports.handler = async (event, context) => { | |
if (event.httpMethod === 'POST') { | |
try { | |
const payload = JSON.parse(event.body); | |
const text = payload.text; | |
return { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const API_URL = "https://api.openai.com/v1/chat/completions"; | |
const MAX_TOKENS = 1500; | |
const TEMPERATURE = 0.5; | |
const SYSTEM_PROMPT = 'Act as assistant'; | |
const MESSAGES = ["hello", "hi!", "how are you?"]; | |
async function openAICompletion(msg) { | |
const options = { | |
method: "POST", | |
headers: { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if(""==0) {/* | |
@echo off | |
echo "BAT" | |
node "%~f0" %* | |
goto :eof | |
*/ | |
console.log( "js" ); | |
} | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
https://gist.github.com/cure53/df34ea68c26441f3ae98f821ba1feb9c | |
http://goo.gl/ZIOZqG (+) | |
http://rol.im/asux/ | |
https://bitbucket.org/decalage/oletools | |
https://goo.gl/fBEuSF (+) | |
https://intothesymmetry.blogspot.co.uk/2016/05/holy-redirecturi-batman.html | |
https://unlogic.co.uk/2016/04/12/binary-bomb-with-radare2-prelude/ | |
http://www.oreilly.com/webops-perf/free/files/docker-security.pdf | |
http://goo.gl/QM0mZx (+) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/python | |
# -*- coding: utf-8 -*- | |
from time import sleep | |
from random import randint | |
from selenium import webdriver | |
from pyvirtualdisplay import Display | |
class MuncherySpider(): | |
def __init__(self): |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SET @oldsite='http://oldsite.com'; | |
SET @newsite='http://newsite.com'; | |
UPDATE wp_options SET option_value = replace(option_value, @oldsite, @newsite) WHERE option_name = 'home' OR option_name = 'siteurl'; | |
UPDATE wp_posts SET post_content = replace(post_content, @oldsite, @newsite); | |
UPDATE wp_links SET link_url = replace(link_url, @oldsite, @newsite); | |
UPDATE wp_postmeta SET meta_value = replace(meta_value, @oldsite, @newsite); | |
/* only uncomment next line if you want all your current posts to post to RSS again as new */ | |
#UPDATE wp_posts SET guid = replace(guid, @oldsite, @newsite); |
NewerOlder