Skip to content

Instantly share code, notes, and snippets.

@zengxinhui
zengxinhui / convert2arch_arm.sh
Last active March 8, 2024 23:41
Replace Oracle Cloud Linux with Arch Linux ARM remotely
[09/23/2023]
Refs:
1. http://os.archlinuxarm.org/os/ArchLinuxARM-aarch64-latest.tar.gz
2. https://dl-cdn.alpinelinux.org/alpine/v3.18/releases/aarch64/alpine-virt-3.18.0-aarch64.iso
3. https://wiki.alpinelinux.org/wiki/Replacing_non-Alpine_Linux_with_Alpine_remotely
4. https://wiki.archlinux.org/index.php/installation_guide#Configure_the_system
5. https://archlinuxarm.org/platforms/armv8/generic
See also:
@edvard-rgb
edvard-rgb / common.env
Last active January 1, 2024 11:28
Saleor platform using docker-compose, Traefik, NginX
DATABASE_URL=postgres://saleor:password@db/saleor
DEFAULT_FROM_EMAIL=noreply@domain.com
CELERY_BROKER_URL=redis://redis:6379/1
JAEGER_AGENT_HOST=jaeger
SECRET_KEY=secret_key
API_URI=https://saleor-api.domain.com/graphql/
ALLOWED_HOSTS=saleor-api.domain.com,saleor-mail.domain.com,saleor-store.domain.com,saleor-admin.domain.com,saleor-jaeger.domain.com
ALLOWED_CLIENT_HOSTS=saleor-api.domain.com,saleor-mail.domain.com,saleor-store.domain.com,saleor-admin.domain.com,saleor-jaeger.domain.com
@rafaelstz
rafaelstz / get.js
Last active October 6, 2023 14:35
AJAX GET and POST with pure Javascript
// Exemplo de requisição GET
var ajax = new XMLHttpRequest();
// Seta tipo de requisição e URL com os parâmetros
ajax.open("GET", "minha-url-api.com/?name=Henry&lastname=Ford", true);
// Envia a requisição
ajax.send();
// Cria um evento para receber o retorno.
@sanmai
sanmai / hide-referer.conf
Last active December 26, 2023 01:35
Hide referer header for outbound links with the power of nginx. For this to work you must use it within a https-enabled server.
# Usage:
# https://www.example.com/hide-referer?http://en.wikipedia.org/wiki/HTTP_referer
server {
server_name www.example.com;
listen 80;
listen 443 ssl;
ssl_certificate /etc/ssl/certs/ssl-cert-snakeoil.pem;
ssl_certificate_key /etc/ssl/private/ssl-cert-snakeoil.key;