Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

View olalonde's full-sized avatar

Oli olalonde

View GitHub Profile
@rain-1
rain-1 / GPT-4 Reverse Turing Test.md
Last active April 16, 2024 23:19
GPT-4 Reverse Turing Test

The reverse turing test

I asked GPT-4 to come up with 10 questions to determine if the answerer was AI or human.

I provided my own answers for these questions and I also asked ChatGPT to answer them.

The result is that GPT-4 was able to correctly differentiate between AI and Human.

#!/bin/bash
dry=0
if [[ $# -gt 0 && $1 == "-n" ]]; then
dry=1
shift
fi
prefix="v"
if [[ $# -gt 0 ]]; then
if [[ $1 = -* || $# -gt 1 ]]; then
@LukeMathWalker
LukeMathWalker / audit-on-push.yml
Last active December 20, 2023 06:57
GitHub Actions - Rust setup with Postgres + sqlx
name: Security audit
on:
push:
paths:
- '**/Cargo.toml'
- '**/Cargo.lock'
jobs:
security_audit:
runs-on: ubuntu-latest
steps:
@FedericoPonzi
FedericoPonzi / CI.yml
Last active April 17, 2024 22:56
Ready to use Github workflow for cross-compiling a rust binary to many Linux architectures.
# Instruction + template repo: https://github.com/FedericoPonzi/rust-ci
# Search and replace <YOUR_BINARY_NAME> with your binary name.
name: CI
on:
pull_request:
push:
branches:
- master
tags:
// First 21-digit prime number found in consecutive digits of e
// answer:
// 957496696762772407663
//
// in hexadecimal:
// 33E7EF9CABBAF6C56F
const bitcore = require("bitcore-lib");
const { PrivateKey, HDPrivateKey } = bitcore;
@chenshaoju
chenshaoju / script running adb shell
Last active March 25, 2024 04:58
Android 8.x Captive Portal Server for Mainland China
settings put global captive_portal_mode 1
settings put global captive_portal_use_https 1
settings put global captive_portal_http_url http://connect.rom.miui.com/generate_204
settings put global captive_portal_https_url https://connect.rom.miui.com/generate_204
settings put global captive_portal_fallback_url http://captive.v2ex.co/generate_204
settings put global captive_portal_other_fallback_urls http://www.google.cn/generate_204
@smeschke
smeschke / gist:df2c5794287fa7044817dc3e00d61351
Last active February 22, 2023 01:21
Using Keras from the Webcam
import cv2, numpy as np, os
#parameters
working_dir = '/home/stephen/Desktop/keras_demo/'
cap = cv2.VideoCapture(0)
org, font, scale, color, thickness, linetype = (50,50), cv2.FONT_HERSHEY_SIMPLEX, 1.2, (234,12,123), 2, cv2.LINE_AA
#chromakey values
h,s,v,h1,s1,v1 = 16,0,64,123,111,187 #green
h,s,v,h1,s1,v1 = 0,74,53,68,181,157 #skin tone
@yocontra
yocontra / aoe2hd.md
Last active June 9, 2023 18:28
Age of Empires II HD - For Mac OSX
anonymous
anonymous / example.js
Created December 17, 2016 03:15
const userRouter = new Router()
.get('/', users.show)
.use(userIsAdminMiddleware)
.put('/', users.update)
.del('/', users.destroy)
app
.use('/users', new Router()
.use('/:username', userRouter)
.get('/', users.list)
anonymous
anonymous / index.js
Created December 17, 2016 03:09
app
.use('/users', new Router()
.use('/:username', new Router()
.get('/', users.show)
// want to add authorization just for update/delete? sure buddy
.use(userIsAdminMiddleware)
.put('/', users.update)
.del('/', users.destroy)
)
.get('/', users.list)