Skip to content

Instantly share code, notes, and snippets.

@y0ngb1n
y0ngb1n / docker-registry-mirrors.md
Last active April 18, 2024 12:27
国内的 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+

<?xml version="1.0" standalone='no'?>
<!DOCTYPE service-group SYSTEM "avahi-service.dtd">
<service-group>
<name replace-wildcards="yes">%h</name>
<service>
<type>_adisk._tcp</type>
<txt-record>sys=waMa=0,adVF=0x100</txt-record>
<txt-record>dk0=adVN=Time Capsule,adVF=0x82</txt-record>
</service>
<service>
@guycalledseven
guycalledseven / manual-uninstall-paragon-ntfs.sh
Last active November 14, 2023 10:48
Manually remove Paragon NTFS v15 leftovers MacOS
# after appcleaner does his magic, do this
sudo rm -rf "/Library/Application Support/Paragon Software/"
sudo rm /Library/LaunchDaemons/com.paragon-software.installer.plist
sudo rm /Library/LaunchDaemons/com.paragon-software.ntfs.loader.plist
sudo rm /Library/LaunchDaemons/com.paragon-software.ntfsd.plist
sudo rm /Library/LaunchAgents/com.paragon-software.ntfs.notification-agent.plist
sudo rm -rf /Library/Filesystems/ufsd_NTFS.fs/
sudo rm -rf /Library/PrivilegedHelperTools/com.paragon-software.installer
sudo rm -rf /Library/Extensions/ufsd_NTFS.kext/
@steinwaywhw
steinwaywhw / One Liner to Download the Latest Release from Github Repo.md
Last active April 14, 2024 15:39
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 \" \
@vittee
vittee / parser_phperror.rb
Last active May 6, 2020 10:06
Simple Fluentd Parser Plugin for parsing PHP Error.
# vim: ts=2
#
require 'fluent/parser'
module Fluent
class TextParser
class PhpErrorParser < Parser
Plugin.register_parser('phperror', self)
config_param :xdebug, :bool, :default => false
@marvell
marvell / remove_apt_cache
Created May 18, 2015 15:29
Remove APT cache (for Dockerfile)
apt-get clean autoclean
apt-get autoremove --yes
rm -rf /var/lib/{apt,dpkg,cache,log}/
@guiprav
guiprav / README.md
Last active August 29, 2015 14:13
grab / recycle shell scripts.

Installation

$HOME/.grabbed_outputs/ must exist before invoking the commands. It should configured 0700 for security.

Example usage

$ echo Foo. | grab
Foo.
$ recycle
Foo.
@Ehesp
Ehesp / Api.php
Created April 26, 2014 19:24
Laravel 4 Api Request Class - Service Provider + Facade
<?php namespace Acme\Facades;
use Illuminate\Support\Facades\Facade;
class Api extends Facade {
/**
* Get the registered name of the component.
*
* @return string
@kevin-smets
kevin-smets / iterm2-solarized.md
Last active April 18, 2024 13:34
iTerm2 + Oh My Zsh + Solarized color scheme + Source Code Pro Powerline + Font Awesome + [Powerlevel10k] - (macOS)

Default

Default

Powerlevel10k

Powerlevel10k

@thepacketgeek
thepacketgeek / 08-xmas-tree-packet.py
Last active September 22, 2023 15:35
Scapy - Creating a TCP Christmas Tree Packet
from scapy.all import *
from random import randint
# Create the skeleton of our packet
template = IP(dst="172.16.20.10")/TCP()
# Start lighting up those bits!
template[TCP].flags = "UFP"
# Create a list with a large number of packets to send