Skip to content

Instantly share code, notes, and snippets.

View jacksonporter's full-sized avatar

JP (Jackson Porter) jacksonporter

  • Orem, UT
  • 04:26 (UTC -06:00)
View GitHub Profile
@Brramble
Brramble / wg.py
Created April 24, 2023 19:03
wireguard python API
import requests
import argparse
# Change this to your domain name or IP address of server running wg-easy
base_url = 'http://localhost:51821'
# Make sure to update the password to the password you set for your webgui
def get_session_id(base_url=base_url):
path = base_url + '/api/session'
headers = {'Content-Type': 'application/json'}
@Jarmos-san
Jarmos-san / main.py
Last active March 26, 2025 14:56
A simple FastAPI project with a health check route
"""Entrypoint to invoke the FastAPI application service with."""
from fastapi import FastAPI, status
from pydantic import BaseModel
import uvicorn
app = FastAPI()
class HealthCheck(BaseModel):
@gjreasoner
gjreasoner / README.md
Last active November 10, 2024 14:36
Expand Ubuntu 20 Proxmox Disk
# Resize the file system in UI, under VM -> Hardware -> Click on the disk to resize, click "Resize disk" button

# Confirm increase in disk space (1TB in my case)
$ lsblk
NAME                      MAJ:MIN RM  SIZE RO TYPE MOUNTPOINT
sda                         8:0    0    1T  0 disk
├─sda1                      8:1    0    1M  0 part
├─sda2                      8:2    0    1G  0 part /boot
└─sda3                      8:3    0    1T  0 part
@igricart
igricart / debian_pkg.md
Last active May 8, 2024 16:01
Create a simple debian package

Having a simple debian package out of a Python script

Create a directory to store the debian folder

$ mkdir -p test_folder/DEBIAN

Create a control file inside debian folder

@poguez
poguez / Amazon Photos or Amazon cloud drive.md
Created April 12, 2020 18:22
How to let Amazon Photos / Amazon Cloud Drive use an external drive

How to use an external drive with Amazon Photos or Amazon Cloud Drive

  1. Install the Amazon Photos Amazon Clour Drive application. When it asks you to sync from your cloud to your local, choose any folder in your hard drive.
  2. Then, turn off the the application
  3. Plug your external hard drive in.
  4. In your Finder, go to: /Users/USER_NAME/Library/Application Support/Amazon Cloud Drive
  5. Open file amzn1.account.#########-settings.json with your text editor, you will see somethings like this:
@pmkay
pmkay / top-brew-packages.txt
Last active April 22, 2025 12:10 — forked from r5v9/top-brew-packages.txt
Top homebrew packages
node: Platform built on V8 to build network applications
git: Distributed revision control system
wget: Internet file retriever
yarn: JavaScript package manager
python3: Interpreted, interactive, object-oriented programming language
coreutils: GNU File, Shell, and Text utilities
pkg-config: Manage compile and link flags for libraries
chromedriver: Tool for automated testing of webapps across many browsers
awscli: Official Amazon AWS command-line interface
automake: Tool for generating GNU Standards-compliant Makefiles
@joseluisq
joseluisq / export_vscode_extesions.md
Last active March 27, 2025 12:21
How to export your VS Code extensions from terminal

How to export your VS Code extensions from terminal

Note: Unix-like systems only.

  1. Export your extensions to a shell file:
code --list-extensions | sed -e 's/^/code --install-extension /' > my_vscode_extensions.sh
@yangxuan8282
yangxuan8282 / emoji-info.sh
Last active January 24, 2025 18:39
Emoji❤bash
#!/bin/bash
# run this scripts with `bash emoji-info.sh` or `./emoji-info.sh`
usage() {
cat << EOF
usage: $0 [options] <emoji>
Options:
-h Show this message
-o Octal Escape Sequence
@phanviet
phanviet / .editorconfig
Last active October 21, 2024 19:07
editorconfig-rails
root = true
[*]
indent_style = space
indent_size = 2
end_of_line = lf
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true
@steinwaywhw
steinwaywhw / One Liner to Download the Latest Release from Github Repo.md
Last active April 24, 2025 03:09
One Liner to Download the Latest Release from Github Repo
  • Use curl to get the JSON response for the latest release
  • Use grep to find the line containing file URL
  • Use cut and tr to extract the URL
  • Use wget to download it
curl -s https://api.github.com/repos/jgm/pandoc/releases/latest \
| grep "browser_download_url.*deb" \
| cut -d : -f 2,3 \
| tr -d \" \