Skip to content

Instantly share code, notes, and snippets.

E:\Documents\PowerShell\profile.ps1

#region conda initialize
# !! Contents within this block are managed by 'conda init' !!
If (Test-Path "E:\anaconda3\Scripts\conda.exe") {
    (& "E:\anaconda3\Scripts\conda.exe" "shell.powershell" "hook") | Out-String | ?{$_} | Invoke-Expression
}
#endregion

# Helper to clear Conda helper flags so Invoke-Conda does not pass empty arguments downstream.
@limaofeng
limaofeng / Sub-info.sgmodule
Last active October 20, 2023 07:37
Surge 获取机场流量信息
#!name=机场流量信息
#!desc=显示机场剩余流量信息以及套餐到期日期
#!system=ios
# 原作者未知,复制自深巷有喵的GitHub
# 更新日期:2023.03.19
# 版本:3.4
# 本模块无法直接远程使用,需将内容复制到本地模块进行修改方可使用,见教程:https://surge.ga/09/1996/
# 先将带有流量信息的节点订阅链接encode,用encode后的链接替换"url="后面的[encode后的机场节点链接]encode链接: https://www.urlencoder.org
# 可选参数 &reset_day,后面的数字替换成流量每月重置的日期,如1号就写1,8号就写8。如"&reset_day=8",不加该参数不显示流量重置信息。
# 可选参数 &expire,机场链接不带expire信息的,可以手动传入expire参数,如"&expire=2022-02-01",注意一定要按照yyyy-MM-dd的格式。不希望显示到期信息也可以添加&expire=false取消显示。
@limaofeng
limaofeng / configs.js
Created January 26, 2019 14:27 — forked from DimitryDushkin/configs.js
React Native 0.57 + Babel 7 + Typescript + Jest
// babel.config.js
module.exports = {
"presets": [
"module:metro-react-native-babel-preset",
],
"plugins": [
["module-resolver", {
"root": ["./src"],
"extensions": [".js", ".ts", ".tsx", ".ios.js", ".android.js"]
}],
@limaofeng
limaofeng / pom.xml
Created January 7, 2019 07:00
完整 POM.xml
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>com.github.life-lab</groupId>
<artifactId>leisure</artifactId>
<version>0.0.2-RELEASE</version>
<relativePath/>
</parent>
wget -qO- git.io/superbench.sh | bash

下载安装

# 下载
wget https://cdn.ipip.net/17mon/besttrace4linux.zip
# 解压
unzip besttrace4linux.zip
# 移动到系统目录
mv besttrace /usr/local/bin/besttrace
# 清除解压文件
rm -rf besttrace*
wget --no-check-certificate https://github.com/teddysun/across/raw/master/bbr.sh && chmod +x bbr.sh && ./bbr.sh

启动 Shadowsocks 代理

配置文件 /srv/ssmgr/default.yml

type: s
shadowsocks:
  address: 127.0.0.1:6001
manager:
  address: 0.0.0.0:6002
  password: 'HPZ7Hwb38fr2Gd7r'
db: 'db.sqlite'
@limaofeng
limaofeng / 0_reuse_code.js
Created August 25, 2017 02:33
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
@limaofeng
limaofeng / http-client.js
Created August 11, 2016 09:24
简化 Nodejs 的 Http Request 。支持 Promise
var http = require('http');
var https = require('https');
const { parse } = require('url');
var querystring = require('querystring');
const request = function (url, options) {
Object.assign(options, parse(url));
const { protocol, method, body } = options;
switch (method) {
case 'get':