Skip to content

Instantly share code, notes, and snippets.

View okadath's full-sized avatar
🏠
Working from home

okadath

🏠
Working from home
View GitHub Profile
@merlox
merlox / jupyter-swap.js
Created February 18, 2024 21:38
Here's how to make a swap programmatically in Jupyter for Solana. It works for me.
// Slippage is defined in bps which means 100 is 1% so we gotta multiply by 100
const getAmountOutJupyter = async (tokenA, tokenB, amount, slippage) => {
const url = `https://quote-api.jup.ag/v6/quote?inputMint=${tokenA}&outputMint=${tokenB}&amount=${Number(amount).toFixed(0)}&slippageBps=${slippage*100}`
let quote = null
try {
quote = await (await fetch(url)).json()
if (!quote) {
console.error('unable to quote')
return null
}
@Lazza
Lazza / README.md
Last active September 20, 2025 00:34
VPNGate Python script

This script is NOT MAINTAINED

This snippet of code was posted in 2014 and slightly revised in 2016 and 2017. It was more of a quick'n'dirty script than a polished tool. It is made only for Linux and in Python 2, which has since become outdated.

I currently do not use it, and I suggest you avoid it as well. Please do not expect support for using this script.

🔥 If you need an alternative, @glaucocustodio has kindly suggested EasyVPN in this comment.

The rest of the README is left for historical purposed.