Skip to content

Instantly share code, notes, and snippets.

@okld
okld / multipage_settings_app.py
Last active May 21, 2024 15:33
Streamlit - Settings page with session state
import streamlit as st
from persist import persist, load_widget_state
def main():
if "page" not in st.session_state:
# Initialize session state.
st.session_state.update({
# Default page.
"page": "home",
@groue
groue / ObservableState.swift
Last active May 21, 2024 15:29
WithBindable
import SwiftUI
/// Supplies an observable object to a view’s hierarchy.
///
/// The purpose of `WithBindable` is to make it possible to instantiate
/// observable objects from environment values, while keeping the object
/// alive as long as the view is rendered.
///
/// For example:
///
@fawazahmed0
fawazahmed0 / breach.txt
Last active May 21, 2024 15:28
Email and password breach collection list
# Please Note, I am sharing this, hoping this will be used for good public use, such as data analysis, penetration testing etc
# These links are already available all over the internet
# Also Note, Trying to login into someone else's account without their permission is unethical and illegal
# Collection 1
magnet:?xt=urn:btih:B39C603C7E18DB8262067C5926E7D5EA5D20E12E&dn=Collection%201&tr=udp%3a%2f%2ftracker.coppersurfer.tk%3a6969%2fannounce&tr=udp%3a%2f%2ftracker.leechers-paradise.org%3a6969%2fannounce&tr=http%3a%2f%2ft.nyaatracker.com%3a80%2fannounce&tr=http%3a%2f%2fopentracker.xyz%3a80%2fannounce
# Collection 2-5 & Antipublic
magnet:?xt=urn:btih:D136B1ADDE531F38311FBF43FB96FC26DF1A34CD&dn=Collection%20%232-%235%20%26%20Antipublic&tr=udp%3a%2f%2ftracker.coppersurfer.tk%3a6969%2fannounce&tr=udp%3a%2f%2ftracker.leechers-paradise.org%3a6969%2fannounce&tr=http%3a%2f%2ft.nyaatracker.com%3a80%2fannounce&tr=http%3a%2f%2fopentracker.xyz%3a80%2fannounce
@icoxfog417
icoxfog417 / edi_security_list.csv
Last active May 21, 2024 15:23
EDINET code & Security code
EDINET CODE 証券コード 会社名 33業種区分 17業種区分 規模区分
E01631 64800 日本トムソン株式会社 機械 機械 6
E04768 85840 株式会社ジャックス その他金融業 金融(除く銀行) 6
E25551 28820 イートアンド株式会社 食料品 食品 7
E00645 38650 北越紀州製紙株式会社 パルプ・紙 素材・化学 6
E01092 51950 バンドー化学株式会社 ゴム製品 自動車・輸送機 7
E00815 41820 三菱瓦斯化学株式会社 化学 素材・化学 4
E00871 42420 株式会社タカギセイコー 化学 素材・化学
E02986 33740 内外テック株式会社 卸売業 商社・卸売
E30863 JA三井リース株式会社
@manishtiwari25
manishtiwari25 / world_currency_symbols.json
Last active May 21, 2024 15:23
List Of Countries With States And Other Useful Information, Updated On 05/19/2024 13:44:07
[
{
"Flag": "http://img.geonames.org/flags/x/ad.gif",
"CountryName": "Andorra",
"Currency": "Euro Member Countries",
"Code": "EUR",
"Symbol": "\u20AC",
"SymbolImage": "https://www.xe.com/symbols-page/symbols/curSymbol8364.gif"
},
{
@morvanabonin
morvanabonin / comandos-docker
Last active May 21, 2024 15:25
Comandos do Docker
Segue a lista de comandos docker e sua utilidade:
docker attach – Acessar dentro do container e trabalhar a partir dele.
docker build – A partir de instruções de um arquivo Dockerfile eu possa criar uma imagem.
docker commit – Cria uma imagem a partir de um container.
docker cp – Copia arquivos ou diretórios do container para o host.
docker create – Cria um novo container.
docker diff – Exibe as alterações feitas no filesystem do container.
docker events – Exibe os eventos do container em tempo real.
docker exec – Executa uma instrução dentro do container que está rodando sem precisar atachar nele.
@knightsc
knightsc / inject.c
Last active May 21, 2024 15:22
An example of how to inject code to call dlopen and load a dylib into a remote mach task. Tested on 10.13.6 and 10.14.3
#include <dlfcn.h>
#include <stdio.h>
#include <unistd.h>
#include <sys/types.h>
#include <mach/mach.h>
#include <mach/error.h>
#include <errno.h>
#include <stdlib.h>
#include <sys/sysctl.h>
#include <sys/mman.h>
@rvrsh3ll
rvrsh3ll / windows-keys.md
Created February 18, 2024 22:44
Windows Product Keys

NOTE

These are NOT product / license keys that are valid for Windows activation.
These keys only select the edition of Windows to install during setup, but they do not activate or license the installation.

Index

Edge Chromium

Note: If your system region is part of the EEA the option to uninstall Edge normally is rolling out in the latest updates for Windows and Edge. With some registry edits, you can change the region after install.

HKLM\SOFTWARE\WOW6432Node\Microsoft\Windows\CurrentVersion\Uninstall\Microsoft Edge, remove NoRemove.

HKLM\SOFTWARE\WOW6432Node\Microsoft\EdgeUpdate\ClientState\{56EB18F8-B008-4CBD-B6D2-8C97FE7E9062}, delete experiment_control_labels if it exists.

Create HKLM\SOFTWARE\WOW6432Node\Microsoft\EdgeUpdateDev and add the AllowUninstall value. This replaces the experiment_control_labels blocker on later versions of Edge.

@umair-me
umair-me / context.cs
Last active May 21, 2024 15:15
EF Core Set all foreign keys to delete restrict
protected override void OnModelCreating(ModelBuilder modelBuilder)
{
foreach (var relationship in modelBuilder.Model.GetEntityTypes().SelectMany(e => e.GetForeignKeys()))
relationship.DeleteBehavior = DeleteBehavior.Restrict;
}