Skip to content

Instantly share code, notes, and snippets.

@Silva01
Silva01 / .html
Last active August 13, 2026 15:17
Exemplo de criação de Modal com Javascript e BootStrap
<html>
<head>
<tittle>Exemplo</tittle>
<!-- Latest compiled and minified CSS -->
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" integrity="sha384-BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va+PmSTsz/K68vbdEjh4u" crossorigin="anonymous">
<script src="https://code.jquery.com/jquery-3.1.1.min.js"></script>
<!-- Latest compiled and minified JavaScript -->
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js" integrity="sha384-Tc5IQib027qvyjSMfHjOMaLkfuWVxZxUPnCJA7l2mCWNIpG9mGCD8wGNIcPD7Txa" crossorigin="anonymous"></script>
@libChan
libChan / wsl_clash_proxy.sh
Last active August 13, 2026 15:15
WSL2使用clash for windows代理
# WSL通过Win访问网络,所以WSL的网关指向的是Windows,DNS服务器指向的也是Windows,设置WSL的proxy为win的代理ip+端口即可
# WSL中的DNS server在/etc/resolv.conf中查看,该文件是由/etc/wsl.conf自动生成的。
# 如果关闭了wsl.conf中自动生成resolve.conf并自行修改了resolve.conf,DNS nameserver并不是本机win ip
# 需要开启wsl.conf的自动生成,再运行以下命令
# https://zhuanlan.zhihu.com/p/153124468
# 添加到环境变量设置中,例如~/.zshrc
export hostip=$(cat /etc/resolv.conf |grep -oP '(?<=nameserver\ ).*')
export https_proxy="http://${hostip}:7890"
export http_proxy="http://${hostip}:7890"
@CharlesNepote
CharlesNepote / csv2datasette
Last active August 13, 2026 15:11
csv2datasette
#!/usr/bin/env bash
# sudo ln -s "$(pwd)/csv2datasette" /usr/bin/csv2datasette
# csv2datasette is meant to explore CSV data. It is not meant to create a sustainable DB.
# csv2datasette is a bash script which open CSV files directly in Datasette. It offers
# a number of options for reading and exploring CSV files, such as --stats, inspired by WTFCsv.
#
# `--stats` option includes, for each column: the column name, the number of unique values,
# the number of filled rows, the number of missing values, the mininmum value, the maximum value,
# the average, the sum, the shortest string, the longest string, the number of numeric values,
Product Year Version Product Keys
Visual Studio 2026 18.x
Professional: NVTDK-QB8J9-M28GR-92BPC-BTHXK
Enterprise: VYGRN-WPR22-HG4X3-692BF-QGT2V
https://x.com/massgravel/status/1988306014371008542
Visual Studio 2022 2021 17.x Professional:
TD244-P4NB7-YQ6XK-Y8MMM-YWV2J
Enterprise:
@FrancoStino
FrancoStino / JetBrains trial reset.md
Created November 13, 2024 16:57
Reset all JetBrains products trial in Linux

In some cases, only these lines will work

for product in IntelliJIdea WebStorm DataGrip PhpStorm CLion PyCharm GoLand RubyMine; do
    rm -rf ~/.config/$product*/eval 2> /dev/null
    rm -rf ~/.config/JetBrains/$product*/eval 2> /dev/null
done

But if not, try these

@mutovkin
mutovkin / import_csv_to_sqlite.sh
Created April 29, 2024 19:35
Converts CSV file into a table in SQLite Database
#!/usr/bin/env bash
# This script accepts 3 parameters:
# 1. CSV file to import (should have first row as a header and names should not contain dashes, all lower case)
# 2. Database filename where the csv file will be imported (filename should have .db extension)
# 3. Table name where the csv file will be imported (table name should not contain dashes, all lower case)
CSV_FILE=$1
DB_FILE=$2
@brccabral
brccabral / .01_README.md
Last active August 13, 2026 15:02
Ubuntu Customizations

Ubuntu extensions and Softwares

On Ubuntu, initially your user may not be in sudo group

# enter as root
su -
# add your username into sudo group
usermod -aG sudo username
exit
# logout / log back in as username
name explain-diff-html
description Use when the user asks for a rich explanation of a code change, diff, branch, or PR. Produces HTML output.

Explain Diff

Please make me a rich, interactive explanation of the specified code change.

It should have these sections:

LLM Wiki

A pattern for building personal knowledge bases using LLMs.

This is an idea file, it is designed to be copy pasted to your own LLM Agent (e.g. OpenAI Codex, Claude Code, OpenCode / Pi, or etc.). Its goal is to communicate the high level idea, but your agent will build out the specifics in collaboration with you.

The core idea

Most people's experience with LLMs and documents looks like RAG: you upload a collection of files, the LLM retrieves relevant chunks at query time, and generates an answer. This works, but the LLM is rediscovering knowledge from scratch on every question. There's no accumulation. Ask a subtle question that requires synthesizing five documents, and the LLM has to find and piece together the relevant fragments every time. Nothing is built up. NotebookLM, ChatGPT file uploads, and most RAG systems work this way.

@EmilioRivera
EmilioRivera / Migrate_chromX.py
Last active August 13, 2026 14:58
Migrate browser data between computer disks. Migrate my Google Chrome, Chromium and Firefox data to a new installation. My use case was transferring profiles, data, history, etc. to a new computer after the original had died. And I refuse to use any of the silly sync services.
#!/usr/bin/env python3
from pathlib import Path
from typing import Generator
import itertools
import json
import subprocess
import logging
import enum
import weakref