Skip to content

Instantly share code, notes, and snippets.

@Francesco149
Francesco149 / docker-cross-device-link.md
Last active October 27, 2023 08:51
docker error creating new backup file '/var/lib/dpkg/status-old': Invalid cross-device link

RegEx

Online Regex Tester Suites & Code Generators

  • regex101 Online regex tester for PHP, PCRE, JavaScript and Python that highlights pattern and matches on the fly. Also features a code generator and a regex debugger!
  • myregextester Sports a separate regex split tester and allows to optimize patterns (I guess this is based on Perl's Regexp::Optimizer module).
  • regexr Online regex tester with good regex replace and explain functionality.
  • debuggex Shows neat expression diagrams (not active anymore).
  • regexper translates regular expressions into an SVG image (for documentation or embedding)
  • RexV2 Evaluator for PHP PCRE, PHP Posix!, Perl, Python, Javascript, Node.JS!
@posener
posener / go-shebang-story.md
Last active October 2, 2025 23:42
Story: Writing Scripts with Go

Story: Writing Scripts with Go

This is a story about how I tried to use Go for scripting. In this story, I’ll discuss the need for a Go script, how we would expect it to behave and the possible implementations; During the discussion I’ll deep dive to scripts, shells, and shebangs. Finally, we’ll discuss solutions that will make Go scripts work.

Why Go is good for scripting?

While python and bash are popular scripting languages, C, C++ and Java are not used for scripts at all, and some languages are somewhere in between.

@dweldon
dweldon / play-webpack.md
Created February 12, 2017 15:02
Add vue-play to a vue-cli webpack project

Introduction

Here are the steps I used to add vue-play to my vue-cli webpack project. These instructions assume a directory structure like this:

.
├── build
└── src
    ├── components
@posener
posener / go-kit.md
Last active February 23, 2024 21:35
Why I Recommend to Avoid Using the go-kit Library

Why I Recommend to Avoid Using the go-kit Library

There is a trending 'microservice' library called go-kit. I've been using the go-kit library for a while now. The library provide a lot of convenience integrations that you might need in your service: with service discovery with Consul, distributed tracing with Zipkin, for example, and nice logic utilities such as round robin client side load balancing, and circuit breaking. It is also providing a way to implement communication layer, with support of RPC and REST.

@xjdata
xjdata / shadowsocks-local-and-kcptun-client-docker-compose.yml
Last active April 24, 2017 10:17
shadowsocks local and kcptun client docker-compose.yml
```
version: '2'
services:
kcptun-client:
image: xjdata/kcptun-client
environment:
- LISTEN_ADDR=0.0.0.0
- LISTEN_PORT=8388
- REMOTE_ADDR=your.ss-server.ip.or.domain
- REMOTE_PORT=29900
@come-maiz
come-maiz / docker-tests.md
Last active May 20, 2017 01:01
Docker snap testing
@snakevil
snakevil / s6-svscan-1.md
Created September 29, 2016 09:32
【译】如何将 s6-svscan 用作初始进程

【译】如何将 s6-svscan 用作初始进程

点击这里阅读原文。


2015 年 6 月 17 日之后,如果你是 Linux 用户,你可以使用 s6-linux-init 包来帮助你实现同样的目标!尽管如此,还是请你首先阅读本篇文档,以理解 s6-linux-init 的工作内容。

将 s6-svscan 用作初始进程是可行的。但这并不意味着你可以直接通过 s6-svscan 引导,因为它还无法胜任完整的初始化系统所应做地全部工作。正确地替换掉初始进程,还需要对其工作内容做更多地理解。

@francoism90
francoism90 / qemu_win10x64.sh
Last active June 18, 2024 03:18
QEMU + Windows 10 x64 + KVM + IOMMU + AHCI + QXL & SPICE (as socket)
#!/bin/sh
qemu-system-x86_64 -enable-kvm -machine q35,accel=kvm \
-cpu host \
-m 4G \
-drive id=disk,file=/home/archie/Documents/Images/win10x64.img,if=none \
-drive file=/home/archie/Downloads/Win10_1709_English_x64.iso,index=3,media=cdrom \
-drive file=/home/archie/Downloads/drivers.iso,index=4,media=cdrom \
-device intel-iommu \
-device ich9-ahci,id=ahci \
-device ide-drive,drive=disk,bus=ahci.0 \
@sherlock221
sherlock221 / react-native Navigator
Created January 24, 2016 09:17
react-native 导航使用demo 基于react-native 0.18.1
/**
*
* User: sherlock
* Date: 16/1/24
* Time: 下午3:53
* 导航使用练习 基于react-native 0.18.1
*/
import React,{View,Navigator,Text,TouchableOpacity,StyleSheet} from "react-native";