Skip to content

Instantly share code, notes, and snippets.

View virtadpt's full-sized avatar
💭
First thing that Microsoft does when buying Github: Add statuses. Whee.

The Doctor virtadpt

💭
First thing that Microsoft does when buying Github: Add statuses. Whee.
View GitHub Profile
@virtadpt
virtadpt / HIT_HMD2043.txt
Created April 22, 2024 16:41 — forked from DanielKeep/HIT_HMD2043.txt
Harold Innovation Technologies - HMD2043 and HMU1440 spec sheets
HIT_HMD2043
__ __
|| ||
||==|| I T
_|| ||_
Harold Innovation Technologies
"If it ain't a HIT, it's a piece of..."
@virtadpt
virtadpt / postgres-cheatsheet.md
Created March 20, 2024 19:24 — forked from Kartones/postgres-cheatsheet.md
PostgreSQL command line cheatsheet

PSQL

Magic words:

psql -U postgres

Some interesting flags (to see all, use -h or --help depending on your psql version):

  • -E: will describe the underlaying queries of the \ commands (cool for learning!)
  • -l: psql will list all databases and then exit (useful if the user you connect with doesn't has a default database, like at AWS RDS)
@virtadpt
virtadpt / gps.xhtml
Created November 18, 2019 23:51 — forked from Arttumiro/gps.xhtml
PAW-gps Mobile code+application
Originally from: https://raw.githubusercontent.com/systemik/pwnagotchi-bt-tether/master/GPS-via-PAW
Systemik made the original code and shaynemk on the pwnagotchi boards added timestamps, altitude, and satellites to the code
You can follow the original guide if you want, this one is just using a bit different code and is typed out a bit better
This is just the android part of the whole guide but the rest can be found here https://community.pwnagotchi.ai/t/setting-up-paw-gps-on-android
And just so everyone knows, me (Arttumiro) didnt do anything coding related at all, i just changed up the guide a bit and made it easier to follow.
======================================================================================
Site of the app I use : http://paw-android.fun2code.de (It needs a lot of permissions but it will not do anything automatically)
Dont worry about incompatibility warnings, the gps code should still work even with that.
@virtadpt
virtadpt / you-dont-need-a-blockchain.md
Created August 29, 2023 20:41 — forked from joepie91/you-dont-need-a-blockchain.md
You Don't Need A Blockchain

You don't need a blockchain.

If you're reading this, you probably suggested to somebody that a particular technical problem could be solved with a blockchain.

Blockchains aren't a desirable thing; they're defined by having trustless consensus, which necessarily has to involve some form of costly signaling to work; that's what prevents attacks like sybil attacks.

In other words: blockchains must be expensive to operate, to work effectively. This makes it a last-resort solution, when you truly have no other options available for solving your problem; in almost every case you want a cheaper and less complex solution than a blockchain.

In particular, if your usecase is commercial, then you do not need or want trustless consensus. This especially includes usecases like supply chain tracking, ticketing, and so on. The whole *p

@virtadpt
virtadpt / s3fs.service
Created July 26, 2023 22:29 — forked from klutchell/s3fs.service
systemd unit file for s3fs fuse auto-mount
Description=S3FS FUSE mount
Documentation=https://github.com/s3fs-fuse/s3fs-fuse
Wants=network-online.target
After=network-online.target
AssertPathIsDirectory=/mnt/s3fs
[Service]
Type=oneshot
RemainAfterExit=yes
ExecStart=/usr/bin/s3fs mybucket:/bucketdir /mnt/s3fs -o url=https://nyc3.digitaloceanspaces.com -o use_cache=/tmp -o allow_other -o use_path_request_style -o uid=1000 -o gid=1000
@virtadpt
virtadpt / config_file_and_command_line_arguments.py
Created April 14, 2023 18:55 — forked from gene1wood/config_file_and_command_line_arguments.py
An example of how to use a config file which is overridden by command line arguments in Python.
#!/usr/bin/env python
import ConfigParser
import argparse
import logging
import os
def type_loglevel(level):
try:
result = getattr(logging, level.upper())
@virtadpt
virtadpt / index.html
Created November 19, 2020 21:16 — forked from hexerei/index.html
Liquid number format with thousands and decimal seperator
<h1>Usage Template</h1>
<h2>With integer to decimal conversion</h2>
<p>
{% include numf.html number=12345 %} <!-- output is 12.345,00 --><br />
{% include numf.html number=12345 decimals=0 %} <!-- output is 12.345 --><br />
{% include numf.html number=12345 decimals=4 %} <!-- output is 12.345.0000 --><br />
{% include numf.html number=12345 ds='.' ts=',' %} <!-- output is 12,345.00 --><br />
</p>
@virtadpt
virtadpt / standalone-vivaldi.md
Created April 7, 2022 00:09 — forked from ruario/standalone-vivaldi.md
Unpacks a Vivaldi Linux browser package into a version named directory and creates a startup script that will cause it to save its profile within this directory—Useful for testing or standalone (portable) installs.

Disclaimer: I wrote this script for my own personal use. Completely unofficial and unsupported by Vivaldi Technologies. However, others are welcome to use it at their own risk.

This script converts a Vivaldi browser Linux package into standalone, self-contained install. It lets you use the rpm and deb packages in a similar way to how people generally used the old Opera (Presto) tar packages—for quick testing, without committing to a full, system-wide install. This could be used for testing a specific setup or version, without touching the system wide settings (profile). It can also be used to create a portable (USB install) of Vivaldi that you could store on an external disk, for sharing between computers. A script that supports integration with the desktop environment is also provided.

Usage example:

sh standalone-vivaldi.sh vivaldi-snapshot-1.7.702.1-1.x86_64.rpm

When the script is done you will have a suitably version named directory.

@virtadpt
virtadpt / web-servers.md
Created April 5, 2022 01:17 — forked from willurd/web-servers.md
Big list of http static server one-liners

Each of these commands will run an ad hoc http static server in your current (or specified) directory, available at http://localhost:8000. Use this power wisely.

Discussion on reddit.

Python 2.x

$ python -m SimpleHTTPServer 8000
@virtadpt
virtadpt / rc-sched-c-pb-3-06-01-2022-1827.txt
Created January 8, 2022 00:32 — forked from alexanderurbs/rc-sched-c-pb-3-06-01-2022-1827.txt
All 'Proud Boy' regional domain names since the insurrection.
// PROUD BOYS REGIONAL DOMAIN NAMES, CREATED SINCE THE INSURRECTION //
inproudboys.com | Squarespace Domains LLC | Creation Date: 2021-01-09T01:38:07Z |
holycityproudboys.com | Epik Inc. | Creation Date: 2021-01-12T04:26:21Z |
proudboysusa.site | eNom, Inc. | Creation Date: 2021-01-14T01:13:00.0Z |
proudboysus.org | DreamHost LLC | Creation Date: 2021-01-14T01:12:45Z |