Skip to content

Instantly share code, notes, and snippets.

@MrHuxu
MrHuxu / Dockerfile
Last active November 4, 2022 03:17
gfriends
FROM debian:stable-slim
RUN sed -i 's/deb.debian.org/mirrors.ustc.edu.cn/g' /etc/apt/sources.list
RUN apt-get update && apt-get install -y unzip expect
WORKDIR /gfriends
COPY ./Gfriends-Inputer-ubuntu-latest.zip /gfriends/
RUN unzip Gfriends-Inputer-ubuntu-latest.zip \
&& mv Gfriends\ Inputer gfriends-inputer \
@joelnitta
joelnitta / start-dockerd.sh
Last active August 24, 2022 05:22
Start rootless docker daemon
#!/usr/bin/bash
# Start docker daemon in background
nohup dockerd-rootless.sh --experimental --storage-driver vfs >| dockerd.log 2>&1 &
# Save the process ID so we can kill it later
echo $! > dockerd.pid
@yinzara
yinzara / github_bitbucket_multiple_ssh_keys.md
Last active March 27, 2025 11:24
Managing SSH keys and repo cloning using multiple accounts on GitHub and BitBucket

Why Multiple SSH keys?

There are numerous reasons you may need to use multiple SSH keys for accessing GitHub and BitBucket

You may use the same computer for work and personal development and need to separate your work.

When acting as a consultant, it is common to have multiple GitHub and/or BitBucket accounts depending on which client you may be working for.

You may have different projects you're working on where you would like to segregate your access.

@chenshengzhi
chenshengzhi / git_ssh_proxy.md
Last active February 27, 2025 13:32
git ssh 代理设置

仅为 GitHub 设置代理

git 代理

设置 git config --global http.https://git.521000.best.proxy socks5://127.0.0.1:1086
设置完成后, ~/.gitconfig 文件中会增加以下条目:

[http "https://github.com"]
    proxy = socks5://127.0.0.1:1086
@magicdude4eva
magicdude4eva / zsh-syntax-highlighting paste performance improvement
Last active March 20, 2025 19:02
zsh-syntax-highlighting paste performance improvement
Add the following in .zshrc:
...
plugins=(osx git zsh-autosuggestions zsh-syntax-highlighting zsh-nvm docker kubectl)
...
### Fix slowness of pastes with zsh-syntax-highlighting.zsh
pasteinit() {
OLD_SELF_INSERT=${${(s.:.)widgets[self-insert]}[2,3]}
zle -N self-insert url-quote-magic # I wonder if you'd need `.url-quote-magic`?
@vfreex
vfreex / scan_isp_blocklist.sh
Created November 20, 2018 09:58
Test which TCP ports are blocked by my ISP
#!/bin/bash
for port in {1..9999}; do
echo -n "TCP $port: "
result=$(nc "$1" "$port" -w 1 2>&1 < /dev/null)
if [ "$?" -eq 0 ]; then
echo "Open"
continue
fi
if [[ "$result" == *refused* ]]; then
@hjbotha
hjbotha / free_ports.sh
Last active April 2, 2025 14:19
Free ports 80 and 443 on Synology NAS
#! /bin/bash
# NEWLY ADDED BACKUP FUNCTIONALITY IS NOT FULLY TESTED YET, USE WITH CARE, ESPECIALLY DELETION
# Developed for DSM 6 - 7.0.1. Not tested on other versions.
# Steps to install
# Save this script in one of your shares
# Edit it according to your requirements
# Backup /usr/syno/share/nginx/ as follows:
# # cd /usr/syno/share/
# # tar cvf ~/nginx.tar nginx
@nickleefly
nickleefly / readme.md
Last active May 28, 2022 12:06
openwrt on newwifi Y1

Resources:

  • [lenovo_y1_v1][1]
  • [hiwifi hc5861][8]
  • [openwrt hiwifi][9]

newwifi is MTK board(MediaTek MT7620A), find the builds for ramips

How to install

@andreicristianpetcu
andreicristianpetcu / ansible-summary.md
Created May 30, 2016 19:25
This is an ANSIBLE Cheat Sheet from Jon Warbrick

An Ansible summary

Jon Warbrick, July 2014, V3.2 (for Ansible 1.7)

Configuration file

intro_configuration.html

First one found from of