Skip to content

Instantly share code, notes, and snippets.

<script>
_etmc.push(["setOrgId", "MID"]);
_etmc.push(["trackPageView", { "category" : "{{ collection.title }}" }]);
</script>
@rsms
rsms / macos-distribution.md
Last active May 14, 2024 15:04
macOS distribution — code signing, notarization, quarantine, distribution vehicles
@mreschke
mreschke / nginx.conf
Last active May 14, 2024 14:54
Nginx config for multiple laravel sites based on /api/v1 url paths
# This config will host your main [Laravel] GUI application at /, and any additional [Lumen] webservices at /api/v1 and /api/v2...
# This also works perfectly for all static file content in all projects
# This is full of debug comments so you can see how to print debug output to browser! Took me hours to nail this perfect config.
# Example:
# http://example.com - Main Laravel site as usual
# http://example.com/about - Main Laravel site about page as usual
# http://example.com/robots.txt - Main Laravel site static content as usual
# http://example.com/api/v1 - Lumen v1 api default / route
# http://example.com/api/v1/ - Lumen v1 api default / route
@canabady
canabady / sqlite3.ProgrammingError.py
Last active May 14, 2024 14:51
Incorrect number of bindings supplied. The current statement uses 1, and there are 74 supplied
# sqlite3.ProgrammingError: Incorrect number of bindings supplied. The current statement uses 1, and there are 74 supplied
# You need to pass in a sequence, but you forgot the comma to make your parameters a tuple:
cursor.execute('INSERT INTO images VALUES(?)', (img,))
# Without the comma, (img) is just a grouped expression, not a tuple, and thus the img string is treated as the input sequence. If that string is 74 characters long, then Python sees that as 74 separate bind values, each one character long.
>>> len(img)
74
import autogen
config_list = [
{
'model': 'gpt-4',
'api_key': 'API_KEY'
}
]
llm_config={
[options]
#
# WARNING:
# If you use the Odoo Database utility to change the master password be aware
# that the formatting of this file WILL be LOST! A copy of this file named
# /etc/odoo/openerp-server.conf.template has been made in case this happens
# Note that the copy does not have any first boot changes
#-----------------------------------------------------------------------------
# Odoo Server Config File - TurnKey Linux
@muff-in
muff-in / resources.md
Last active May 14, 2024 14:42
A curated list of Assembly Language / Reversing / Malware Analysis / Game Hacking-resources
@raurir
raurir / HookProblem.tsx
Last active May 14, 2024 14:41
Hook problem
import { useEffect, useState } from "react";
// you can not modify this function:
const getAdvice = () => {
console.log("getAdvice");
const [advice, setAdvice] = useState("");
useEffect(() => {
const url = "https://api.adviceslip.com/advice";
@dylnmc
dylnmc / snow.py
Last active May 14, 2024 14:40
tkinter snow
#! /usr/bin/env python2
"""
This is one of the cooler python scripts that uses simple animation in Tkinter.
A bunch of white circles start positioned at the top of the Tkinter panel when it opens.
Then, on a light grey background, the snowflakes gently fall downwards. When they reach
the bottom, they apparently disappear and start back above the top of the screen and
fall back into view. This continuous and soothing snow fall was so relaxing that I made
it open in the background of my mac terminal, which had a transparent background.
@veekaybee
veekaybee / normcore-llm.md
Last active May 14, 2024 14:35
Normcore LLM Reads

Anti-hype LLM reading list

Goals: Add links that are reasonable and good explanations of how stuff works. No hype and no vendor content if possible. Practical first-hand accounts of models in prod eagerly sought.

Foundational Concepts

Screenshot 2023-12-18 at 10 40 27 PM

Pre-Transformer Models