Skip to content

Instantly share code, notes, and snippets.

View gearnode's full-sized avatar

Bryan FRIMIN gearnode

View GitHub Profile
@markuman
markuman / README.md
Last active February 11, 2025 11:30
🗺️ OSM - self host the entire planet 🌎 in ~30 minutes 🚀

🗺️ OSM - self host the entire planet 🌎 in ~30 minutes 🚀

TL;DR

mkdir osm
wget -O osm/planet.mbtiles https://hidrive.ionos.com/api/sharelink/download?id=SYEgScrRe
podman run -ti --rm -p 9000:9000 --name sms -v $(pwd)/osm/:/data/ registry.gitlab.com/markuman/sms:latest
firefox http://localhost:9000
@Mostly-BSD
Mostly-BSD / FreeBSD-AARCH64_and_RISCV64_Using_QEMU.md
Last active May 12, 2022 02:56
How to run FreeBSD ARM64 and RISC-V64 images under FreeBSD x86_64

How to run FreeBSD ARM64 and RISC-V64 images under FreeBSD x86_64

Quick and easy way to try out FreeBSD Arm64 and RISC-V64 images on a x86_64 host.

Notes:

  • We are going to use the pre-built VM images supplied by FreeBSD instead of installing from scratch.
  • We will convert the .raw image files to zvols
  • We will bridge the network interface on the host and use a tap interface on the VM

Step 1: Install Necessary Packages

@theodorosploumis
theodorosploumis / Nework_throttling_profiles.md
Last active March 13, 2025 06:49
Web development - Custom network throttling profiles
Profile download (kb/s) upload (kb/s) latency (ms)
Native 0 0 0
GPRS 50 20 500
56K Dial-up 50 30 120
Mobile EDGE 240 200 840
2G Regular 250 50 300
2G Good 450 150 150
3G Slow 780 330 200

Risk Management

  • The service must have performed a Rapid Risk Assessment and have a Risk Record bug
  • The service must be registered via a New Service issue

Infrastructure

  • Access and application logs must be archived for a minimum of 90 days
  • Use Modern or Intermediate TLS
@fernandoaleman
fernandoaleman / mysql2-mojave.md
Last active February 7, 2024 19:19
Install mysql2 on MacOS Mojave

For MacOS Catalina, visit Install mysql2 on MacOS Catalina

Problem

Installing mysql2 gem errors on MacOS Mojave.

Solution

Make sure openssl is installed on Mac via Homebrew.

@pgolding
pgolding / policy.md
Last active October 18, 2022 13:21
s3 bucket policy for presigned URLs generated by serverless lambda functions

AWS Presigned URLs

Presigned URLs are useful for fine-grained access control to resources on s3.

For example, if storing larger text blocks than DynamoDB might allow with its 400KB size limits s3 is a useful option.

Ignoring various ACL methods and using presigned URLs, it's possible to create lambda functions that can generate the required upload and download URLs.

Using the default IAM roles and lambda proxy configuration of serverless, lambdas are assigned an IAM role for the application (so that a logical group of functions can share resources - e.g. for a CRUD REST API). Each function then assumes the IAM role via its own function name.

@styblope
styblope / docker-api-port.md
Last active March 28, 2025 15:47
Enable TCP port 2375 for external connection to Docker

Enable TCP port 2375 for external connection to Docker

See this issue.
Docker best practise to Control and configure Docker with systemd.

  1. Create daemon.json file in /etc/docker:

     {"hosts": ["tcp://0.0.0.0:2375", "unix:///var/run/docker.sock"]}
    
@gangsta
gangsta / SSL.md
Last active March 9, 2025 17:07
How to Setting Up a Comodo SSL Cert

How to Setting Up a Comodo SSL Cert

  • I advice you to buy SSL Certs from officially Comodo only , or some SSL reseller whose you trust.

These are the steps I went through to set up an SSL cert. Purchase the cert

Prior to purchasing a cert, you need to generate a private key, and a CSR file (Certificate Signing Request). You’ll be asked for the content of the CSR file when ordering the certificate:

openssl req -new -newkey rsa:2048 -nodes -keyout example_com.key -out example_com.csr
@thbar
thbar / gem_update.rb
Last active June 10, 2017 12:24
A lo-tech gem auto-updated script
# Important: please make sure to still carefully read each gem changelog!
require 'yaml'
def system!(cmd)
raise "Cannot run command!!!" unless system(cmd)
end
gems = YAML.load(IO.read('outdated.yml')).fetch('gems')
gems.each do |gem|
steps:
- checkout
- restore_cache:
keys:
- project-{{ checksum "mix.exs" }}-{{ checksum "mix.lock" }}
- run:
name: deps
command: MIX_ENV=test mix deps.get
- run:
name: compile test