Skip to content

Instantly share code, notes, and snippets.

@gtrabanco
gtrabanco / setup-unifi-route-vpn-client.ts
Created February 15, 2025 12:47
This setup all ipv4 cidr of cloudflare as a route through vpn warp client that was previously setup
import IPCIDR from 'ip-cidr';
const endpoint = 'https://unifi'; // url
const apiKey = ''; // secret, create it in your unifi admin user
const description = 'Cloudflare'; // Route name
const wgClientName = 'Cloudflare Warp Client';
const wireguardInterfaceAddress = '172.16.0.2/32';
const wireguardInterfacePrivateKey = ''; // Secret provided by wgcf, see: https://www.tiernanotoole.ie/2024/12/12/how-to-use-cloudflare-warp-with-a-udm-pro.html
const wireguardPeerPublicKey = 'bmXOC+F1FxEMF9dyiK2H5/1SUtzH0JuVo51h2wPfgyo=';
@nzhul
nzhul / LayersToPNG.jsx
Created January 26, 2016 23:09
Spine 2D - LayersToPNG.jsx fix for Photoshop CC
// This script exports photoshop layers as individual PNGs. It also
// writes a JSON file that can be imported into Spine where the images
// will be displayed in the same positions and draw order.
// Setting defaults.
var writePngs = true;
var writeTemplate = false;
var writeJson = true;
var ignoreHiddenLayers = true;
var pngScale = 1;