Skip to content

Instantly share code, notes, and snippets.

@tavoweb
tavoweb / openvpncloudlared.txt
Created May 20, 2024 07:04 — forked from rameshkrishna/openvpncloudlared.txt
OpenVPN with Cloudflared Tunnels - No Port Fowarding - No Static IP - NO DDNS
Task:
Access OpenVPN or any Service on Home Network from Public Networks (Hotel) without configuring router and without static IP
Step 1:
Install OpenVPN on any device connected to Home Network (Raspberry mychoice with pivpn)
- Change default OpenVPN protocol from UDP to TCP (Cloudflare doesn't support UDP)
- Make a note of TCP port number (default is 443)
- Grab the OpenVPN client config file
Step 2:
Install Cloudflared on Raspberry PI
- Create a tunnel
@rameshkrishna
rameshkrishna / openvpncloudlared.txt
Last active May 20, 2024 07:04
OpenVPN with Cloudflared Tunnels - No Port Fowarding - No Static IP - NO DDNS
Task:
Access OpenVPN or any Service on Home Network from Public Networks (Hotel) without configuring router and without static IP
Step 1:
Install OpenVPN on any device connected to Home Network (Raspberry mychoice with pivpn)
- Change default OpenVPN protocol from UDP to TCP (Cloudflare doesn't support UDP)
- Make a note of TCP port number (default is 443)
- Grab the OpenVPN client config file
Step 2:
Install Cloudflared on Raspberry PI
- Create a tunnel
@kidGodzilla
kidGodzilla / pdf2png.sh
Last active May 20, 2024 07:03
PDF to PNG Script for Quickdrop App
# PDF to PNG shell script for Quickdrop app
# https://quickdrop.antran.app/
# pdfburst shell script
# chmod 0755 pdfburst
#!/usr/bin/swift
import Foundation
import PDFKit
@auramagi
auramagi / ConsoleOutput.txt
Last active May 20, 2024 07:01
SwiftUI _viewDebugData
// Output of print(_viewDebugData), formatted for easier viewing
[SwiftUI._ViewDebug.Data(
data: [
SwiftUI._ViewDebug.Property.value: SwiftUI._SafeAreaInsetsModifier(elements: [], nextInsets: nil),
SwiftUI._ViewDebug.Property.displayList: (display-list
(item #:identity 2 #:version 6
(frame (143.66666666666666 354.0; 88.0 20.333333333333332))
(text "Hello World" #:size (88.0, 20.333333333333332))
)
@yunpengn
yunpengn / README.md
Last active May 20, 2024 06:57
A step-by-step guide to install PostgreSQL on Ubuntu without sudo privilege

Install PostgreSQL on Ubuntu without sudo

Being the most advanced open-source relational database, many of us need to install PostgreSQL for some purposes. However, sometimes you may not have sudo privilege on an Ubuntu server. Then, how should you install PostgreSQL in this case?

Compile from source!

Next, we will show a step-by-step guide on how to install PostgreSQL on Ubuntu by compiling it from source.

PostgreSQL Compilation & Installation

@ammario
ammario / ipint.go
Last active May 20, 2024 06:57
Golang IP <-> int conversion
func ip2int(ip net.IP) uint32 {
if len(ip) == 16 {
return binary.BigEndian.Uint32(ip[12:16])
}
return binary.BigEndian.Uint32(ip)
}
func int2ip(nn uint32) net.IP {
ip := make(net.IP, 4)
binary.BigEndian.PutUint32(ip, nn)
@hoandang
hoandang / php-docker-ext
Created May 20, 2017 01:12
Complete list of php docker ext
RUN apt update
RUN apt upgrade -y
RUN apt install -y apt-utils
RUN a2enmod rewrite
RUN apt install -y libmcrypt-dev
RUN docker-php-ext-install mcrypt
RUN apt install -y libicu-dev
RUN docker-php-ext-install -j$(nproc) intl
RUN apt-get install -y libfreetype6-dev libjpeg62-turbo-dev libpng12-dev
RUN docker-php-ext-configure gd --with-freetype-dir=/usr/include/ --with-jpeg-dir=/usr/include/
@aanari
aanari / set-alacritty-default.sh
Last active May 20, 2024 06:54
Set Alacritty as Default Terminal Editor (Ubuntu)
sudo update-alternatives --install /usr/bin/x-terminal-emulator x-terminal-emulator $(which alacritty) 50
sudo update-alternatives --config x-terminal-emulator
@OrionReed
OrionReed / dom3d.js
Last active May 20, 2024 06:51
3D DOM viewer, copy-paste this into your console to visualise the DOM topographically.
// 3D Dom viewer, copy-paste this into your console to visualise the DOM as a stack of solid blocks.
// You can also minify and save it as a bookmarklet (https://www.freecodecamp.org/news/what-are-bookmarklets/)
(() => {
const SHOW_SIDES = false; // color sides of DOM nodes?
const COLOR_SURFACE = true; // color tops of DOM nodes?
const COLOR_RANDOM = false; // randomise color?
const COLOR_HUE = 190; // hue in HSL (https://hslpicker.com)
const MAX_ROTATION = 180; // set to 360 to rotate all the way round
const THICKNESS = 20; // thickness of layers
const DISTANCE = 10000; // ¯\\_(ツ)_/¯
@thushan
thushan / ConvertAzureAppSettingsToLocalSettings
Created May 20, 2024 05:53
Azure App Settings to local.settings.json converter
<#
Azure App Settings / Environment Variables to local.settings.json Converter
| v1.0.0 |-----------------------------------------------------------------
This script will take an Azure App Settings JSON file and convert it to a
local.settings.json file for use with Azure Functions.
It also moves some of the Azure specific settings to the top of the file.