Skip to content

Instantly share code, notes, and snippets.

Avatar
🏆
Focusing

赵达 zhaoda

🏆
Focusing
View GitHub Profile
@steven2358
steven2358 / ffmpeg.md
Last active Jun 26, 2022
FFmpeg cheat sheet
View ffmpeg.md
@veltman
veltman / README.md
Created Sep 2, 2017
SVG animation to video
View README.md

Converting an SVG animation to a video with the MediaRecorder API and a hidden canvas.

Drawing frames from img elements can introduce an extra delay, so this version generates all the frames upfront and then renders them in a loop with requestAnimationFrame().

See also: Canvas animation to video

@DarrenN
DarrenN / get-npm-package-version
Last active May 30, 2022 — forked from yvele/get-npm-package-version
Extract version from package.json (NPM) using bash / shell
View get-npm-package-version
# Version key/value should be on his own line
PACKAGE_VERSION=$(cat package.json \
| grep version \
| head -1 \
| awk -F: '{ print $2 }' \
| sed 's/[",]//g')
echo $PACKAGE_VERSION
@PurpleBooth
PurpleBooth / README-Template.md
Last active Jul 3, 2022
A template to make good README.md
View README-Template.md

Project Title

One Paragraph of project description goes here

Getting Started

These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.

Prerequisites

@mralexho
mralexho / setup-dev.sh
Last active Mar 7, 2022
Install homebrew, nginx, mysql, php55, and composer on Mac OS X
View setup-dev.sh
#!/bin/bash
# install homebrew
ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
# install homebrew's official php tap
brew tap josegonzalez/homebrew-php
View The front-end development course system.md
@zhaoda
zhaoda / helper.class.php
Last active Dec 19, 2015
ZenTaoPMS.4.1版本安装过程和安装后空白问题的解决方案 现象: 安装过程中内容显示缺失,或者安装后页面空白,打开error_reporting后函数array_merge()报错; 原因: php5中array_merge()只接受array类型的参数; 解决: 修改 ~/framework/helper.class.php 第403行,改为 return $files ? $files : array(); //change by zhaoda
View helper.class.php
<?php
/**
* The helper class file of ZenTaoPHP framework.
*
* The author disclaims copyright to this source code. In place of
* a legal notice, here is a blessing:
*
* May you do good and not evil.
* May you find forgiveness for yourself and forgive others.
* May you share freely, never taking more than you give.
@un1ko85
un1ko85 / new_gist_file.sh
Created May 10, 2013
Starting and stopping NginX / MySQL / PHP-FPM on Mac OS X
View new_gist_file.sh
#! /bin/bash
MYSQL="/opt/local/etc/LaunchDaemons/org.macports.mysql5/mysql5.wrapper"
NGINX="/opt/local/sbin/nginx"
PHPFPM="/opt/local/sbin/php-fpm"
PIDPATH="/opt/local/var/run"
MEMCACHED="/opt/local/bin/memcached -m 24 -P /opt/local/var/run/memcached.pid -u root"
if [ $1 = "start" ]; then
sudo $MYSQL start
echo "Starting php-fpm ..."
@ck-on
ck-on / ocp.php
Last active May 26, 2022
OCP - Opcache Control Panel (aka Zend Optimizer+ Control Panel for PHP)#ocp #php #opcache #opcode #cache #zend #optimizerplus #optimizer+
View ocp.php
<?php
/*
OCP - Opcache Control Panel (aka Zend Optimizer+ Control Panel for PHP)
Author: _ck_ (with contributions by GK, stasilok)
Version: 0.1.7
Free for any kind of use or modification, I am not responsible for anything, please share your improvements
* revision history
0.1.7 2015-09-01 regex fix for PHP7 phpinfo
0.1.6 2013-04-12 moved meta to footer so graphs can be higher and reduce clutter
View transition_sniffing.js
function whichTransitionEvent(){
var t;
var el = document.createElement('fakeelement');
var transitions = {
'transition':'transitionend',
'MSTransition':'msTransitionEnd',
'MozTransition':'transitionend',
'WebkitTransition':'webkitTransitionEnd'
}