Skip to content

Instantly share code, notes, and snippets.

View crazywhalecc's full-sized avatar

Jerry Ma crazywhalecc

  • Shanghai
  • 19:51 (UTC +08:00)
View GitHub Profile
@tessus
tessus / compile_tmux.sh
Last active January 25, 2024 23:37
compile tmux (static)
#!/bin/bash
TMUX_VERSION=2.3
NCURSES_VERSION=6.0
LIBEVENT_VERSION=2.0.22
BASEDIR=${HOME}/work/tmux-static
TMUXTARGET=${BASEDIR}/local
mkdir -p $TMUXTARGET
cd $BASEDIR
@yulanggong
yulanggong / calender.md
Created June 13, 2014 05:35
日历标准格式研究

日历标准格式研究

日历的导入导出

格式

现在通用的日历格式是 iCalendar,通常扩展名是 .ics

BEGIN:VCALENDAR #日历开始
@HikoQiu
HikoQiu / 断点续传.php
Created February 1, 2014 10:59
PHP断点续传
// 下载
<?php
$file = './Penguins.jpg';
$file_display_name = basename($file);
$fsize = @filesize($file);
if (!empty($fsize)) {
$start = null ;
$end = $fsize - 1;
if (isset($_SERVER['HTTP_RANGE']) && ($_SERVER['HTTP_RANGE'] != "") && preg_match("/^bytes=([0-9]+)-([0-9]*)$/i", $_SERVER['HTTP_RANGE'], $match) && ($match[1] < $fsize) && ($match[2] < $fsize)) {
$start = $match[1];
@jakebellacera
jakebellacera / ICS.php
Last active May 25, 2024 19:17
A convenient script to generate iCalendar (.ics) files on the fly in PHP.
<?php
/**
* This is free and unencumbered software released into the public domain.
*
* Anyone is free to copy, modify, publish, use, compile, sell, or
* distribute this software, either in source code form or as a compiled
* binary, for any purpose, commercial or non-commercial, and by any
* means.
*