Skip to content

Instantly share code, notes, and snippets.

View kuops's full-sized avatar
😉
I may be slow to respond.

Shiny Hou kuops

😉
I may be slow to respond.
View GitHub Profile
@dantio
dantio / nginx.conf
Created May 6, 2017 13:05
Wordpress behind HTTPS/SSL Proxy (nginx, fastcgi)
##
# nginx server with http + ssl/https (no WP)
# /etc/nginx/sites-available/example.com
server {
listen 80;
server_name example.com;
location / {
proxy_pass http://no-ssl:8080;
proxy_set_header Host $host;
@jriguera
jriguera / delete-dockerhub-images.sh
Last active May 26, 2022 05:27
Delete Docker images on DockerHub
#!/bin/bash
# Based on kizbitz/dockerhub-v2-api-organization.sh at https://gist.github.com/kizbitz/175be06d0fbbb39bc9bfa6c0cb0d4721
# Example for the Docker Hub V2 API
# Returns all images and tags associated with a Docker Hub organization account.
# Requires 'jq': https://stedolan.github.io/jq/
# set username, password, and organization
UNAME=""
UPASS=""
@BretFisher
BretFisher / docker-for-mac.md
Last active May 23, 2024 22:25
Getting a Shell in the Docker Desktop Mac VM

2021 Update: Easiest option is Justin's repo and image

Just run this from your Mac terminal and it'll drop you in a container with full permissions on the Docker VM. This also works for Docker for Windows for getting in Moby Linux VM (doesn't work for Windows Containers).

docker run -it --rm --privileged --pid=host justincormack/nsenter1

more info: https://github.com/justincormack/nsenter1


@m-x-k
m-x-k / pipelineChooseDockerTags.groovy
Created November 16, 2016 22:05
Jenkins pipeline - choose docker tags
/*
* Displays input dropdown select containing docker image tags
* Manage Jenkins->Script Approval (required)
*/
node {
stage('chooseDockerTags') {
def image = "IMAGE"
def url = "https://LOCAL-DOCKER-REG:5000/v2/${image}/tags/list"
def list = getDockerImageTags(url)
@toritori0318
toritori0318 / nginx_for_production.conf
Last active December 29, 2021 19:04
nginx balancer example
worker_processes 1;
daemon off;
error_log /dev/stdout;
events {
worker_connections 1024;
}
http {
@kmjones1979
kmjones1979 / nginx.conf
Last active November 15, 2021 11:05
This is an example NGINX configuration for the blog: Performing A/B Testing with NGINX - This demonstrates split_clients based routing on an argument named token
user nginx;
worker_processes auto;
error_log /var/log/nginx/error.log info;
pid /var/run/nginx.pid;
events { worker_connections 1024; }
http {
default_type text/html;
log_format main '$remote_addr -> $request $status $body_bytes_sent bytes -> $upstream_addr';
access_log /var/log/nginx/access.log main;
@hlissner
hlissner / codesign_gdb.md
Last active March 11, 2024 07:09
Codesign gdb on OSX
@ryerh
ryerh / tmux-cheatsheet.markdown
Last active June 1, 2024 05:51 — forked from MohamedAlaa/tmux-cheatsheet.markdown
Tmux 快捷键 & 速查表 & 简明教程

注意:本文内容适用于 Tmux 2.3 及以上的版本,但是绝大部分的特性低版本也都适用,鼠标支持、VI 模式、插件管理在低版本可能会与本文不兼容。

Tmux 快捷键 & 速查表 & 简明教程

启动新会话:

tmux [new -s 会话名 -n 窗口名]

恢复会话:

@evantoli
evantoli / GitConfigHttpProxy.md
Last active June 1, 2024 18:25
Configure Git to use a proxy

Configure Git to use a proxy

In Brief

You may need to configure a proxy server if you're having trouble cloning or fetching from a remote repository or getting an error like unable to access '...' Couldn't resolve host '...'.

Consider something like: