Skip to content

Instantly share code, notes, and snippets.

@d68fbe50
d68fbe50 / booru-sites.md
Created January 2, 2024 20:28 — forked from lxfly2000/booru-sites.md
Booru sites.
@d68fbe50
d68fbe50 / A_one_line_formula.md
Created August 8, 2023 04:34 — forked from seb26/A_one_line_formula.md
This formula can be used in Google Sheets to take a value in bytes and then represent it in a human-readable format with binary units (KiB, MiB, GiB, and so on).
=ROUND( A2/(1024)^(FLOOR(log(A2)/log(1024))), 2) & " " & SWITCH( FLOOR( log(A2) / log(1024) ) ,0,"Bytes",1,"KiB",2,"MiB",3,"GiB",4,"TiB")
@d68fbe50
d68fbe50 / sysctl.conf
Created July 26, 2023 07:07 — forked from heldner/sysctl.conf
Linux kernel tuning settings for large number of concurrent clients
# Kernel sysctl configuration file for Red Hat Linux
#
# For binary values, 0 is disabled, 1 is enabled. See sysctl(8) and
# sysctl.conf(5) for more details.
# Controls source route verification
net.ipv4.conf.default.rp_filter = 1
# Do not accept source routing
net.ipv4.conf.default.accept_source_route = 0
@d68fbe50
d68fbe50 / rsync_from_server.md
Created July 5, 2023 10:19 — forked from lgloege/rsync_from_server.md
Use rsync to copy from a server with bastion server between them. Does not require scp or ssh tunneling.

Setup keyless login

  1. On local make an RSA key if you haven't already (ssh-keygen)
  2. Copy that key into .ssh/authorized_keys on the first (i.e. bastion) server (ssh-copy-id [email protected]) 2b. Test that you can ssh [email protected] and connect without password
  3. ssh to first.server and create an RSA key on first.server if you haven't already (ssh-keygen)
  4. ssh-copy-id to the server you want to access (what I am calling second.server) 4b. test that you can ssh from first.server to second.server without entering a password

To copy from server to local

rsync -e "ssh [email protected] ssh" [email protected]:/path/to/file /path/to/local/dest

@d68fbe50
d68fbe50 / twice-knock-knock.gif
Created November 11, 2022 04:08 — forked from calvinbui/twice-knock-knock.gif
twice-knock-knock.gif
twice-knock-knock.gif
@d68fbe50
d68fbe50 / fromis9.gif
Created November 11, 2022 04:08 — forked from calvinbui/fromis9.gif
fromis9.gif
fromis9.gif
@d68fbe50
d68fbe50 / docker.md
Created June 17, 2022 03:30 — forked from FreddieOliveira/docker.md
This tutorial shows how to run docker natively on Android, without VMs and chroot.

Docker on Android πŸ‹πŸ“±

Edit πŸŽ‰

All packages, except for Tini have been added to termux-root. To install them, simply pkg install root-repo && pkg install docker. This will install the whole docker suite, left only Tini to be compiled manually.


Summary

ElasticSearch cheat sheet

@d68fbe50
d68fbe50 / gce-to-gcs-uploads.md
Created February 24, 2022 09:13 — forked from ryderdamen/gce-to-gcs-uploads.md
Uploading Files from Google Compute Engine (GCE) VMs to Google Cloud Storage (GCS)

Uploading Files from Google Compute Engine (GCE) VMs to Google Cloud Storage (GCS)

I had a bit of trouble trying to configure permissions to upload files from my Google Compute Engine instance to my Google Cloud Storage bucket. The process isn't as intuitive as you think. There are a few permissions issues that need to be configured before this can happen. Here are the steps I took to get things working.

Let's say you want to upload yourfile.txt to a GCS bucket from your virtual machine. You can use the gsutil command line tool that comes installed on all GCE instances.

If you've never used the gcloud or gsutil command line tools on this machine before, you will need to initialize them with a service account.