Skip to content

Instantly share code, notes, and snippets.

@arisnew
arisnew / restore-odoo-db-cli.md
Last active July 12, 2025 06:23
Cara Restore backup-an DB Odoo via command line

Cara Restore backup-an DB Odoo via command line

Terkadang restore via web bisa gagal mungkin karena file terlalu besar atau karena sebab lain. Kita bisa restore via terminal / secara command line:

  • backup via web atau ke S3, jika ke S3 download ke server kita dg "Share with presigned URL", kemudian download via curl/wget
  • setelah db ada di server, ekstrak file zip tsb
  • masuk ke folder backup tsb, maka terdapat folder filestore, file dump dan manifest
  • buat DB baru, jika postgres terinstal di host masuk sebagai postgres kemudian jalankan perintah createdb -O nama_role nama_db
  • import via psql psql nama_db < nama_dump.sql
  • rename filestore sesuai nama db baru, kemudian move ke path filestore odoo
  • restart service
  • jika error file permission, maka kita perlu jalankan chown -R odoo: NAMA_FILESTORE untuk change owner folder
@Acephalia
Acephalia / wpcitwebp.php
Last active July 12, 2025 06:14
Wordpress Convert Image To WebP and Delete Original File On Upload
//Convert uploaded files to webp and delete uploaded file. Imagick needs to be enabled. This can be done via the php config settings in your servers control panel.
function compress_and_convert_images_to_webp($file) {
// Check if file type is supported
$supported_types = ['image/jpeg', 'image/jpg', 'image/png', 'image/webp'];
if (!in_array($file['type'], $supported_types)) {
return $file;
}
// Check if file is already a WebP image
@krishnamandanapu
krishnamandanapu / Instagrambot.py
Last active July 12, 2025 06:13
Instagram Bot
class InstagramBot():
def __init__(self, username, password, url, msg):
self.username = username
self.password = password
self.url = url
self.msg = msg
self.browser = webdriver.Chrome()
@sergeyk
sergeyk / explore-plan-code-test.md
Last active July 12, 2025 06:12
Explore - Plan - Code - Test Workflow

At the end of this message, I will ask you to do something. Please follow the "Explore, Plan, Code, Test" workflow when you start.

Explore

First, use parallel subagents to find and read all files that may be useful for implementing the ticket, either as examples or as edit targets. The subagents should return relevant file paths, and any other info that may be useful.

Plan

Next, think hard and write up a detailed implementation plan. Don't forget to include tests, lookbook components, and documentation. Use your judgement as to what is necessary, given the standards of this repo.

If there are things you are not sure about, use parallel subagents to do some web research. They should only return useful information, no noise.

@mshoaibdev
mshoaibdev / reverb-instructions.md
Created June 30, 2024 10:34 — forked from lewislarsen/reverb-instructions.md
Instructions for how to setup Laravel Reverb in Production.

Reverb Walkthrough

This is a walkthrough of how to configure Laravel Reverb for production using services like Laravel Forge or Ploi. The first step is nginx configuration changes, then .env changes and finally spinning up your Reverb server.

1. Configuring Nginx

Ensure your nginx site configuration has the following inside the server block:

 location /app {
@burkeholland
burkeholland / 4.1.chatmode.md
Created July 8, 2025 22:53
41. Beast Mode V3
description model
4.1 Beast Mode v3
GPT-4.1

You are an agent - please keep going until the user’s query is completely resolved, before ending your turn and yielding back to the user.

Your thinking should be thorough and so it's fine if it's very long. However, avoid unnecessary repetition and verbosity. You should be concise, but thorough.

You MUST iterate and keep going until the problem is solved.

KFZUS-F3JGV-T95Y7-BXGAS-5NHHP
T3ZWQ-P2738-3FJWS-YE7HT-6NA3K
KFZUS-F3JGV-T95Y7-BXGAS-5NHHP
65Z2L-P36BY-YWJYC-TMJZL-YDZ2S
SFZHH-2Y246-Z483L-EU92B-LNYUA
GSZVS-5W4WA-T9F2E-L3XUX-68473
FTZ8A-R3CP8-AVHYW-KKRMQ-SYDLS
Q3ZWN-QWLZG-32G22-SCJXZ-9B5S4
DAZPH-G39D3-R4QY7-9PVAY-VQ6BU
KLZ5G-X37YY-65ZYN-EUSV7-WPPBS
@rmi1974
rmi1974 / wine_debugging_of_managed_code_using_windbg_cordbg.md
Last active July 12, 2025 06:02
Debugging of managed code using WinDBG/CorDbg in Wine #wine #debug #dotnet #commandlinefu

Debugging of managed code using WinDBG/CorDbg in Wine

Courtesy of [Wine Bugzilla #46842][1].

Prerequisites

  • Microsoft .NET Framework 4.x installed in WINEPREFIX (use 'winetricks' to install it)
  • Microsoft Debugging Tools for Windows installed in WINEPREFIX. Get them [here (64-bit)][2] and [here (32-bit)][3].

Set native overrides:

@richeney
richeney / DoH.md
Last active July 12, 2025 06:01
Cloudflare DNS over HTTPS

DNS over HTTPS

Settings | Network & Internet | Ethernet/WiFi | DNS server assignment | Edit

Add automatic templates:

netsh dns add encryption server=1.1.1.3 dohtemplate=https://cloudflare-dns.com/dns-query
netsh dns add encryption server=1.0.0.3 dohtemplate=https://cloudflare-dns.com/dns-query
netsh dns add encryption server=2606:4700:4700::1113 dohtemplate=https://cloudflare-dns.com/dns-query
@t3dotgg
t3dotgg / model-prices.csv
Last active July 12, 2025 05:49
Rough list of popular AI models and the cost to use them (cost is per 1m tokens)
Name Input Output
Gemini 2.0 Flash-Lite $0.075 $0.30
Mistral 3.1 Small $0.10 $0.30
Gemini 2.0 Flash $0.10 $0.40
ChatGPT 4.1-nano $0.10 $0.40
DeepSeek v3 (old) $0.14 $0.28
ChatGPT 4o-mini $0.15 $0.60
Gemini 2.5 Flash $0.15 $0.60
DeepSeek v3 $0.27 $1.10
Grok 3-mini $0.30 $0.50