Skip to content

Instantly share code, notes, and snippets.

@alquezajanmaverick
alquezajanmaverick / domain-redirection.liquid
Last active September 11, 2023 21:24
Shopify Domain Redirection
<script>
/**
* Geolocation app must be installed
* redirection variable -> list of supported countries with specifi domain extension ( assigned via Shopify Markets setting )
*/
(()=>{
let published_locales = {{ shop.published_locales | json }}
let shop_locales = published_locales.map(locale=>locale.shop_locale.locale.toLowerCase())
let redirection = ["cz","dk","fi","fr","gr","it","nl","pl","pt","es","se"]
@fusetim
fusetim / protonvpn-wireguard-generator.py
Last active April 30, 2024 00:53
Generate lots of Wireguard configuration for your ProtonVPN Account.
import http.client
import http.cookies
import json
import base64
import hashlib
from cryptography.hazmat.primitives import serialization
from cryptography.hazmat.primitives.asymmetric import x25519
from cryptography.hazmat.primitives.asymmetric import ec
from cryptography.hazmat.primitives import hashes
@bluewalk
bluewalk / GetNordVPNWireGuardDetails.md
Last active May 6, 2024 01:14
Getting NordVPN WireGuard details

About

Instructions to obtain WireGuard details of your NordVPN account. These can be used to setup a WireGuard tunnel on your router to NordVPN.

Source: https://forum.gl-inet.com/t/configure-wireguard-client-to-connect-to-nordvpn-servers/10422/27

Prerequisites

If you have any linux machine, use that or install a vm if you don't have one.

Get their official linux app installed. Make sure you have wireguard installed too. And set the used technology to Nordlynx by running nordvpn set technology nordlynx

@ikawka
ikawka / cloudflare-trace.js
Last active December 31, 2023 12:29
Trace current user's location via javascript with CloudFlare provided the /cdn-cgi/trace is enabled.
(function($){
$(function(){
$.ajax({
contentType: 'application/text; charset=utf-8',
crossBrowser: true,
type: 'GET',
url: '/cdn-cgi/trace',
}).done(function(d){
var data = d.replace(/[\r\n]+/g, '","').replace(/\=+/g, '":"');
data = '{"' + data.slice(0, data.lastIndexOf('","')) + '"}';
@unofficialshopify
unofficialshopify / How to get a visitor’s location and redirect them to right store for Shopify
Last active December 8, 2022 05:58
How to get a visitor’s location and redirect them to right store for Shopify
These days some business have online store in different country with the same name. They have different URL for different country but they are facing a problem that how they can redirect store url based on IP address for eg.
www.domain.us – Customers in the United States
www.domain.ca – Customers in the Canada
www.domain.com – Customers in rest the world
This article guide you to do that.
@vietlq
vietlq / README.md
Last active March 10, 2022 05:05
Hugo Partial Template to render Open Graph & Twitter Card meta tags