Skip to content

Instantly share code, notes, and snippets.

@mizegit
mizegit / serviceContainer.php
Created March 25, 2025 16:09
laravel框架技术关键解析 代码
<?php
interface Visit
{
public function go();
}
class Train implements Visit
{
public function go()
{
@mizegit
mizegit / offline_mdn_docs.md
Created January 2, 2021 04:57 — forked from zed-dz/offline_mdn_docs.md
Offline MDN Docs
@mizegit
mizegit / gist:cd5b52655f32443c7b2a8897365654b0
Last active July 6, 2018 12:28
记录linux环境下安装nodejs
title 记录linux环境下安装nodejs
date 2018-07-06

权限问题

如果npm全局安装,会提示权限问题,没有修改usr/lib/的权限。

官方建议不要用管理员权限安装,就是不要用sudo解决。

@mizegit
mizegit / gist:5f7a89476e118e520b716a75a0f6e16b
Last active July 6, 2018 04:17
记录xubuntu 16.04.4的重装
title 记录xubuntu 16.04.4的重装
date 2018-07-06

ubuntu16.04.4,

启动盘:

lsblk 查看block块设备,包括磁盘。

@mizegit
mizegit / tocYDKJS
Last active May 27, 2020 20:11
add toc to You-Dont-Know-JS on github
// ==UserScript==
// @name github toc
// @namespace http://tampermonkey.net/
// @version 0.1
// @description try to take over the world!
// @include https://github.com/getify/You-Dont-Know-JS/*
// @author You
// @match https://developer.mozilla.org/en-US/docs/Web/API/EventTarget/addEventListener
// @grant none
// @require https://greasyfork.org/scripts/28721-mutations/code/mutations.js?version=597950
@mizegit
mizegit / README.md
Created June 29, 2018 09:03 — forked from magnetikonline/README.md
Using Dnsmasq with Ubuntu 16.04LTS/14.04LTS/12.04LTS for virtual machine web application testing.

Using Dnsmasq with Ubuntu for VM web application testing

When running virtual machines under a Linux host system for testing web apps in various browsers (e.g. Internet Explorer), I found it rather tedious having to continually tweak the hosts file within each VM for the purpose of adding entries pointing back to the host machine's development web server address.

Instead the steps below will setup Dnsmasq on a Ubuntu 16.04LTS, 14.04LTS or 12.04LTS host machine for the purpose of serving both it's own DNS queries and that of virtual machine guests. Dnsmasq will parse the /etc/hosts file on your host machine where we will keep a single set of DNS entires to our test web application(s).

@mizegit
mizegit / ss-install.md
Created November 24, 2017 12:19 — forked from aa65535/ss-install.md
shadowsocks-libev install at Debian or CentOS

Debian

cd /tmp
# 编译环境准备&安装依赖包
apt-get install --no-install-recommends build-essential autoconf libtool libssl-dev libpcre3-dev asciidoc xmlto git
# 克隆源码
git clone --recursive https://github.com/shadowsocks/shadowsocks-libev.git
# 开始编译
https://s3.amazonaws.com/psiphon/web/u1dy-me41-s9yv/zh/index.html
set nocp
set tabstop=4
set shiftwidth=4
set noexpandtab
colorscheme evening
set guioptions-=m
set guioptions-=T
set nu
set noundofile
set nobackup
@ECHO OFF
If "%PROCESSOR_ARCHITECTURE%"=="AMD64" (Set b=%SystemRoot%\SysWOW64) Else (Set b=%SystemRoot%\system32)
Rd "%b%\test_permission_JayXon" 2>nul
Md "%b%\test_permission_JayXon" 2>nul||(Echo 请使用右键管理员身份运行&&Pause >nul&&Exit)
Rd "%b%\test_permission_JayXon" 2>nul
sc start SEVPNCLIENT > nul
if %errorlevel%==1056 (echo 服务已经运行 && goto e)
if %errorlevel%==0 echo 开始运行...
for /l %%i in (3,-1,1) do (
(set/p x=%%i)<nul