Skip to content

Instantly share code, notes, and snippets.

# -*- coding: utf-8; mode: tcl; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:ft=tcl:et:sw=4:ts=4:sts=4
# $Id: Portfile 71588 2010-09-17 05:21:24Z ryandesign@macports.org $
PortSystem 1.0
name php5
conflicts php5-devel php52
# Update revision of php5-eaccelerator when updating version of php5
epoch 1
version 5.3.3
<?xml version="1.0"?>
<root>
<item>
<name>F19 to F19</name>
<appendix>(F19 to Hyper (ctrl+shift+cmd+opt) + F19 Only, F19)</appendix>
<identifier>private.f192f19</identifier>
<autogen>
--KeyOverlaidModifier--
KeyCode::F19,
KeyCode::COMMAND_L,
@qzi
qzi / etag.rb
Created December 4, 2013 08:37 — forked from dchentech/etag.rb
# 项目提供动态的文件下载,由于文件系统里的位置因加了自定义的目录分级,而与和URL有偏差,所以需要经过控制器来重写文件路径来读取,在此也保证了当前请求静态文件在磁盘上只有一份以节约空间。
# 为了避免单个客户端多次请求同一个文件,在该控制器方法里加上HTTP头部的ETag来进行304缓存。
def file
response.headers['Etag'] = Digest::SHA1.hexdigest(@your_file_instance)
send_file @your_file_instance.path
end
@qzi
qzi / snell-tf.sh
Last active January 8, 2022 16:16
For snell v3.0.0rc2 on ubuntu aarch64
#!/usr/bin/env bash
PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:~/bin
export PATH
CONF="/etc/snell/snell-server.conf"
SYSTEMD="/etc/systemd/system/snell.service"
apt-get install unzip -y
cd ~/
wget --no-check-certificate -O snell.zip https://github.com/surge-networks/snell/releases/download/v3.0.0rc2/snell-server-v3.0.0-linux-aarch64.zip
unzip -o snell.zip
rm -f snell.zip
@qzi
qzi / pom.xml
Created August 8, 2022 16:38
Cucumber4java using io.cucumber
<!--
! Excerpted from "The Cucumber for Java Book",
! published by The Pragmatic Bookshelf.
! Copyrights apply to this code. It may not be used to create training material,
! courses, books, articles, and the like. Contact us if you are in doubt.
! We make no guarantees that this code is fit for any purpose.
! Visit http://www.pragmaticprogrammer.com/titles/srjcuc for more book information.
-->
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
@qzi
qzi / wpa_customer_message.js
Created September 29, 2023 08:44
wpa_customer_message
var options = {
method: 'POST',
uri: 'https://api.weixin.qq.com/cgi-bin/message/custom/send',
body: {
touser: wxContext.FROM_OPENID,
msgtype: "text",
text: {
content: "Hello World"
}
},
@qzi
qzi / sysctl.conf.sh
Last active March 2, 2024 16:18
sysctl.conf.sh for macos
#!/bin/bash
# Desc: network performance tunning for mac gateway and it should run using sudo
# increase the socket buffer
sysctl -w kern.ipc.maxsockbuf=16777216
# net.inet.tcp.sendspace + net.inet.tcp.recvspace < kern.ipc.maxsockbuf
sysctl -w net.inet.tcp.sendspace=1048576
sysctl -w net.inet.tcp.recvspace=1048576