Skip to content

Instantly share code, notes, and snippets.

View ensean's full-sized avatar
🏔️

ensean

🏔️
  • Guangzhou, China
View GitHub Profile
@harfqaf
harfqaf / extras.py
Last active March 10, 2024 20:59
API Extras example for stable-diffusion-webui
#! /usr/bin/python3
"""
extras.py: Upscale PNG images in DIR_IN into DIR_OUT.
Usage: Set API_URL, DIR_IN, and DIR_OUT. Then run ./extras.py
For API documentation see: http://localhost:7860/docs#/
"""
import sys
import io
import os
@everesio
everesio / aws.tf
Last active April 29, 2024 02:37
kafka-proxy with Amazon MKS
provider "aws" {
region = "us-east-1"
}
data "aws_caller_identity" "current" {}
data "aws_vpc" "vpc" {
filter {
name = "tag:Name"
values = [
@Tantas
Tantas / vpn_setup.sh
Created April 6, 2019 20:18
IKEv2 VPN server on Amazon linux
#!/bin/bash
# Installs an IKEv2 VPN server on Amazon linux.
# Reference:
# https://hub.zhovner.com/geek/universal-ikev2-server-configuration/
# https://www.zeitgeist.se/2013/11/22/strongswan-howto-create-your-own-vpn/
# Operates well on a t2.nano instance for administrative use. t2 allows full CPU
# usage as long as < 5% of daily operation time which is perfect for an
# administrative VPN. The server fits well inside the ram requirements and uses
@dasgoll
dasgoll / gist:455522f09cb963872f64e23bb58804b2
Created January 28, 2017 15:42
Jenkins REST API example using crumb
Each Jenkins page has a REST API hyperlink at the bottom, this is because each page has its own endpoint.
http://localhost:8080/me
configure
Click 'Show API Token'
78e21f82a9e137614fef5b9593bcf827 = API Token
curl -s -u goll:78e21f82a9e137614fef5b9593bcf827 http://localhost:8080/crumbIssuer/api/json