Skip to content

Instantly share code, notes, and snippets.

View voocx's full-sized avatar
🍀

voocx

🍀
  • Chengdu, China
View GitHub Profile

Oh my zsh.

Oh My Zsh

Install ZSH.

sudo apt install zsh-autosuggestions zsh-syntax-highlighting zsh

Install Oh my ZSH.

@voocx
voocx / List.md
Created October 2, 2017 06:47 — forked from msurguy/List.md
List of open source projects made with Laravel

Other people's projects:

My projects (tutorials are on my blog at http://maxoffsky.com):

@voocx
voocx / 15个源码语法着色
Created September 25, 2017 06:02 — forked from lzqwebsoft/15个源码语法着色
前台代码高亮的插件
本文作者是Gavin McLeod,一个被困在《电子世界争霸战》里的骨灰级Web极客。在文中列举了15个帮助开发者快速编码、优化代码的语法高亮工具,每个高亮工具都有其功能特色。(以下是编译内容)
  开发者和顽固的代码极客深知Code Syntax Highlighter(以下简称“代码语法高亮工具”)作为二级符号的一种形式,便于在一个结构化语言或标记语言里书写代码。有些代码高亮编辑器里融合了多个语法高亮功能,例如拼写检查、代码折叠。语法高亮工具可以在总体策略的使用上起到较大的作用:改善文本的可读性和上下文语境,尤其是在代码页数较多的情况下。另外还能帮助开发者快速在编程过程中定位bug源头。
  不管你是一个代码极客还是一个吊儿郎当的码农,下面为你提供的代码语法高亮工具保证能让你写的代码焕然一新。
  1. Prism
  Prism是一个只有1.5KB大小的压缩版轻量级工具,能够简单方便的整合到CSS和JavaScript文件里,运行速度很快。已经使用在Dabblet里(一个交互式的CSS场地)美化了很多代码,所以说Prism很稳定。新的编程语言也可以加入进来,在使用这个插件架构的前提下,新加入的语言功能性将不断提升;外观风格和使用感觉都可以通过CSS来设计。
@voocx
voocx / js-exif-rotate.html
Created September 1, 2017 03:32 — forked from runeb/js-exif-rotate.html
Auto-rotate images locally in the browser by parsing exif data
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script>
<input id="file" type="file" accept="image/*" />
<br/>
<h2>As read:</h2>
<img id="placeholder1" width=300/><br/>
<h2>Rotated by exif data:</h2>
<img id="placeholder2" width=300/>
<script>
@voocx
voocx / semantic-pedantic.md
Created August 27, 2017 15:01 — forked from jashkenas/semantic-pedantic.md
Why Semantic Versioning Isn't

Spurred by recent events (https://news.ycombinator.com/item?id=8244700), this is a quick set of jotted-down thoughts about the state of "Semantic" Versioning, and why we should be fighting the good fight against it.

For a long time in the history of software, version numbers indicated the relative progress and change in a given piece of software. A major release (1.x.x) was major, a minor release (x.1.x) was minor, and a patch release was just a small patch. You could evaluate a given piece of software by name + version, and get a feeling for how far away version 2.0.1 was from version 2.8.0.

But Semantic Versioning (henceforth, SemVer), as specified at http://semver.org/, changes this to prioritize a mechanistic understanding of a codebase over a human one. Any "breaking" change to the software must be accompanied with a new major version number. It's alright for robots, but bad for us.

SemVer tries to compress a huge amount of information — the nature of the change, the percentage of users that wil

@voocx
voocx / capistrano-laravel-deploy.rb
Created July 12, 2017 06:47 — forked from arhea/capistrano-laravel-deploy.rb
Capistrano 3 deploy script for Laravel 4.
# config valid only for Capistrano 3.1
lock '3.1.0'
set :application, "" # EDIT your app name
set :scm, :git
set :repo_url, "" # EDIT your git repository
set :keep_releases, 3
<?php
/**
* json_encode function for non-standard string with 6byte emoji chars, like `\xed\xa0\xbd\xed\xb1\xa9`
*
* see https://github.com/amekkawi/diskusagereports/blob/master/scripts/inc/json_encode.php
*
*/
/**
@voocx
voocx / CsvResponse.php
Created June 21, 2017 06:00 — forked from mathewbyrne/CsvResponse.php
A small Symfony 2 class for returning a response as a CSV file. Based on the Symfony JsonResponse class.
<?php
namespace Jb\AdminBundle\Http;
use Symfony\Component\HttpFoundation\Response;
class CsvResponse extends Response
{
protected $data;

Date: 2015-12-17 Title: Emoji表情传输和保存:对非BMP范围的Unicode字符的处理 Category: PHP Tags: Emoji, Unicode, PHP, Lua Slug: php_emoji_to_unicode

参考:

UTF-16

@voocx
voocx / ddd.php
Created April 18, 2017 15:03 — forked from johannilsson/ddd.php
<?php
class Domain_Model_User {
private $id;
private $name;
}
interface Domain_Model_UserRepository {
public function save(Domain_Model_User $user);
public function find($id); // Returns Domain_Model_User
}
class UserService {