Skip to content

Instantly share code, notes, and snippets.

@lbbedendo
lbbedendo / pgadmin4_install_linux_mint.sh
Last active January 22, 2025 18:37
Instalando o pgAdmin 4 no Linux Mint (web e/ou desktop)
# Adaptado da página oficial do pgAdmin: https://www.pgadmin.org/download/pgadmin-4-apt/
# Testado na versão 20.3 (una)
#
# Setup the repository
#
# Install the public key for the repository (if not done previously):
sudo curl https://www.pgadmin.org/static/packages_pgadmin_org.pub | sudo apt-key add
@hackermondev
hackermondev / research.md
Last active January 22, 2025 18:35
Unique 0-click deanonymization attack targeting Signal, Discord and hundreds of platform

hi, i'm daniel. i'm a 15-year-old high school junior. in my free time, i hack billion dollar companies and build cool stuff.

3 months ago, I discovered a unique 0-click deanonymization attack that allows an attacker to grab the location of any target within a 250 mile radius. With a vulnerable app installed on a target's phone (or as a background application on their laptop), an attacker can send a malicious payload and deanonymize you within seconds--and you wouldn't even know.

I'm publishing this writeup and research as a warning, especially for journalists, activists, and hackers, about this type of undetectable attack. Hundreds of applications are vulnerable, including some of the most popular apps in the world: Signal, Discord, Twitter/X, and others. Here's how it works:

Cloudflare

By the numbers, Cloudflare is easily the most popular CDN on the market. It beats out competitors such as Sucuri, Amazon CloudFront, Akamai, and Fastly. In 2019, a major Cloudflare outage k

@plembo
plembo / pandocdocx2md.md
Last active January 22, 2025 18:35
Convert docx to markdown with pandoc

Convert Word documents to markdown with pandoc

I use pandoc to convert masses of Word documents to markdown. Still working on a generic script, but for now here's the "gist" of what I type into the terminal:

$ myfilename="example"
$ pandoc \
-t markdown_strict \
--extract-media='./attachments/$myfilename' \
$myfilename.docx \
@vgel
vgel / r1.py
Last active January 22, 2025 18:34
script to run deepseek-r1 with a min-thinking-tokens parameter, replacing </think> with a random continuation string to extend the model's chain of thought
import argparse
import random
import sys
from transformers import AutoModelForCausalLM, AutoTokenizer, DynamicCache
import torch
parser = argparse.ArgumentParser()
parser.add_argument("question", type=str)
parser.add_argument(
@nandorojo
nandorojo / knew.md
Last active January 22, 2025 18:34
What I wish I knew when I started with Expo Web, React Navigation & Next.js

I started using React Native in September 2018. I always forget some things when I build new apps, so I'll keep track of the gotchas on this post.

Some topics, such as navigation, will be fundamental to how I think about apps. Others, will be one-line helpers that make apps work more smoothly.

It's gotten to the point where I find my own answers from 6 months before on certain Github issues.

I'll keep adding over time as I think of more. If anyone thinks these topics would be useful, let me know and I'll elaborate.

I have made libraries to address a number of the topics here, from navigation to design.

@dragon788
dragon788 / README.md
Last active January 22, 2025 18:30 — forked from atenni/README.md
How to permalink to a gist's raw file

Problem: When linking to the raw version of a gist, the link changes with each revision.

Solution:

To return the first file from a gist: https://gist.github.com/[gist_user]/[gist_id]/raw/

To get a file from multi–file gist: https://gist.github.com/[gist_user]/[gist_id]/raw/[file_name]

@sbyx
sbyx / wake-up-light-alarm-with-sunrise-effect.yaml
Last active January 22, 2025 18:27
Home Assistant Blueprint: Wake-up light alarm with sunrise effect
blueprint:
name: Wake-up light alarm with sunrise effect
description: 'A wake-up light alarm with a brightness and color temperature sunrise
effect. Note: Requires date_time_iso sensor in configuration, not manually executable!'
domain: automation
input:
light_entity:
name: Wake-up light entity
description: The light to control. Turning it off during the sunrise will keep
it off. Color temperature range is auto-detected.
@detain
detain / response1.md
Created May 12, 2023 16:42
adding keyboard movement to three.js

To add WASD keyboard movement support to the webgl_loader_fbx.html file from the Three.js GitHub repository, you can make the following changes:

  1. First, add a controls variable to the JavaScript code near the top of the file, to store the instance of the THREE.OrbitControls object:
var camera, controls;
  1. Next, locate the init() function and add the following code after the camera variable is defined, to instantiate the OrbitControls object and set some initial values:
@triplepoint
triplepoint / wake-up-light-alarm-with-sunrise-effect.yaml
Last active January 22, 2025 18:26 — forked from sbyx/wake-up-light-alarm-with-sunrise-effect.yaml
Home Assistant Blueprint: Wake-up light alarm with sunrise effect
blueprint:
name: Wake-up light alarm with sunrise effect
description:
"A wake-up light alarm with a brightness and color temperature sunrise
effect. Note: not manually executable!"
domain: automation
input:
light_entity:
name: Wake-up light entity
description: