Skip to content

Instantly share code, notes, and snippets.

View lifesign's full-sized avatar
🎯
Focusing

Feng lifesign

🎯
Focusing
View GitHub Profile
jQuery(function($) {
$('form[data-async]').live('submit', function(event) {
var $form = $(this);
var $target = $($form.attr('data-target'));
$.ajax({
type: $form.attr('method'),
url: $form.attr('action'),
data: $form.serialize(),
{
"close_windows_when_empty": false,
"color_scheme": "Packages/3024 Color Scheme/3024 Night.tmTheme",
"detect_slow_plugins": false,
"draw_minimap_border": true,
"find_selected_text": true,
"folder_exclude_patterns":
[
"Html",
"upload",
@lifesign
lifesign / sublime-key-settings
Last active December 22, 2015 21:19
sublime-key-binding
[
{ "keys": ["ctrl+e"], "command": "run_macro_file", "args": {"file": "Packages/Default/Delete Line.sublime-macro"} },
{ "keys": ["ctrl+\\"], "command": "auto_complete" },
{ "keys": ["f2"], "command": "side_bar_rename" },
{ "keys": ["ctrl+alt+b"], "command": "open_browser", "args" : {"url" : "http://www.baidu.com/s?wd=%s"}}
// { "keys": ["ctrl+r"], "command": "show_overlay", "args": {"overlay": "goto", "text": "@function "} }
// { "keys": ["super+r"], "command": "show_overlay", "args": {"overlay": "goto", "text": "@function "} }
]

Awesome PHP

A curated list of amazingly awesome PHP libraries, resources and shiny things.

Composer

Composer Related

<?php
/*
|--------------------------------------------------------------------------
| Cache route filter
|--------------------------------------------------------------------------
|
| This filter must be called 'before' and 'after' any of the front-end
| pages are loaded.
| Before the page is loaded, we return a cached version of the page, if
<?php
class Auth extends Laravel\Auth {}
/**
* @method static add(string $name, string $source, array $dependencies = array(), array $attributes = array())
* @method static string styles()
* @method static string scripts()
*/
class Asset extends Laravel\Asset {}
class Autoloader extends Laravel\Autoloader {}
class Bundle extends Laravel\Bundle {}
@lifesign
lifesign / ClearWindow.py
Created November 21, 2013 04:17
Python IDLE Clear Window Extension
"""
Clear Window Extension
Version: 0.2
Author: Roger D. Serwy
roger.serwy@gmail.com
Date: 2009-06-14
@lifesign
lifesign / start.php
Created December 11, 2013 05:20 — forked from hugomrdias/start.php
/**
* Thanks to @philsturgeon for pointing this package
* and Filipe Dobreira "https://github.com/filp" for creating it ^^
* Github : https://github.com/filp/whoops
* How to:
* Step 1 : Setup composer for Laravel 3
* Step 2 : Add this code to your application/start.php or anywhere u like
* as long its after laravel registers its own error handlers
* so NOT in : index.php, paths.php or laravel/**
*
http_proxy=127.0.0.1:8087 composer install
@lifesign
lifesign / 0_reuse_code.js
Created January 8, 2014 02:20
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