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
import { defineAsyncComponent } from 'vue' | |
const Content = defineAsyncComponent(() => import('./component-content.js')) | |
export default { | |
name: 'App', | |
components: { Content }, | |
template: /*html*/` | |
<Content /> | |
` |
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
// paste this into your chrome dev console for Speech Synthesis | |
const originalFetch = window.fetch | |
const patchedFetch = (...args) => { | |
if (args[1].method == 'POST' && args[1].body.length > 0 && /moderations$/.test(args[0])) { | |
const aiResponse = JSON.parse(args[1].body)["input"].split("\n\n\n") | |
if (aiResponse.length > 1) { | |
const text = aiResponse.slice(1).join(". ").trim() | |
console.log(text) |
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
from google.appengine.api import apiproxy_stub | |
from google.appengine.api import apiproxy_stub_map | |
class FetchServiceMock(apiproxy_stub.APIProxyStub): | |
def __init__(self, service_name='urlfetch'): | |
super(FetchServiceMock, self).__init__(service_name) | |
def set_return_values(self, **kwargs): | |
self.return_values = kwargs |
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
FROM rust:alpine | |
RUN apk add --no-cache \ | |
bash \ | |
binutils-gold \ | |
ca-certificates \ | |
clang \ | |
curl \ | |
g++ \ | |
git \ |
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
// ==UserScript== | |
// @name ChatGPT Speak and Listen | |
// @namespace http://tampermonkey.net/ | |
// @version 0.1 | |
// @description try to take over the world! | |
// @author https://gist.github.com/kesor | |
// @downloadURL https://gist.github.com/kesor/fc0d1a9b285011b74670109f22a59670 | |
// @match https://chat.openai.com/chat | |
// @grant unsafeWindow | |
// ==/UserScript== |
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
# unicorn | |
description "unicorn ruby app server" | |
start on (local-filesystems and net-device-up IFACE=lo and runlevel [2345]) | |
stop on runlevel [!2345] | |
env WORKDIR=/data | |
env PIDFILE=/data/tmp/pids/unicorn.pid | |
env CFGFILE=/data/config/unicorn.rb |
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
PUT _template/cloudtrail | |
{ | |
"index_patterns": ["cloudtrail-*"], | |
"settings": { | |
"number_of_shards": 1, | |
"mapping": { | |
"total_fields": { | |
"limit": 10000 | |
} | |
} |
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
server { | |
listen 80; | |
listen [::]:80; | |
server_name seafile.example.com; | |
root /usr/local/www/nginx; | |
error_page 500 502 503 504 /50x.html; | |
location = 50x.html { | |
root /usr/local/www/nginx-dist; | |
} |
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
from django.core.exceptions import MiddlewareNotUsed | |
from django.conf import settings | |
from django.db import connection | |
from pymongo.connection import Connection | |
from time import time | |
import struct | |
import bson | |
from bson.errors import InvalidBSON | |
class SqldumpMiddleware(object): |
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/bash | |
set -euxo pipefail | |
export CALICO_VERSION="${CALICO_VERSION:-3.13.4}" | |
export CNI_VERSION="${CNI_VERSION:-0.8.7}" | |
export CONTAINERD_VERSION="${CONTAINERD_VERSION:-1.4.3}" | |
export DOCKER_VERSION="${DOCKER_VERSION:-20.10.0}" | |
export FILEBEAT_VERSION="${FILEBEAT_VERSION:-7.5.1}" | |
export FLANNEL_VERSION="${KUBERNETES_VERSION:-0.11.0}" |
NewerOlder