This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// 当前文件:download.php | |
$action = @$_GET['action']; | |
// 自己获取这些信息 | |
$remote_url = get_remote_file_url(); | |
$file_size = get_remote_file_size($remote_url); | |
$tmp_path = get_tmp_path(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$('.load-gist').on('click', function() { | |
var gist = { | |
// URL 传参自己改下 | |
url: '//gist.github.com/printempw/' + $(this).data('hash') + '.json?callback=?', | |
dom: this | |
} | |
// 因为 URL 中带了 `callback=?`,所以这里 jQuery 会使用 JSONP 方式请求 | |
$.getJSON(gist.url, function(data) { | |
// 加载样式 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
namespace App\Providers; | |
use Illuminate\Support\Str; | |
use App\Services\PluginManager; | |
use Illuminate\Support\ServiceProvider; | |
class PluginServiceProvider extends ServiceProvider | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
public function boot(PluginManager $plugins) | |
{ | |
// store paths of class files of plugins | |
$src_paths = []; | |
foreach ($plugins->getPlugins() as $plugin) { | |
$src_paths[$plugin->getNameSpace()] = $plugin->getPath()."/src"; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
namespace App\Services; | |
use Illuminate\Support\Arr; | |
use App\Events\PluginWasEnabled; | |
use App\Events\PluginWasDisabled; | |
use Illuminate\Support\Collection; | |
use App\Events\PluginWasUninstalled; | |
use Illuminate\Filesystem\Filesystem; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
namespace App\Services; | |
use Illuminate\Support\Arr; | |
use Illuminate\Support\Str; | |
use Illuminate\Contracts\Support\Arrayable; | |
/** | |
* @property string $name |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function isEmpty(obj) { | |
// null and undefined are "empty" | |
if (obj == null) return true; | |
// Assume if it has a length property with a non-zero value | |
// that that property is correct. | |
if (obj.length > 0) return false; | |
if (obj.length === 0) return true; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* @Author: printempw | |
* @Date: 2016-07-25 13:03:12 | |
* @Last Modified by: printempw | |
* @Last Modified time: 2016-07-25 14:51:29 | |
*/ | |
var superagent = require('superagent'); | |
// fill your ids here |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
class Shit | |
{ | |
/** | |
* Function reload | |
*/ | |
public static function fuck() | |
{ | |
$args = func_get_args(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#kaomoji { | |
-moz-user-select: none; | |
-webkit-user-select: none; | |
-ms-user-select: none; | |
} | |
.info-rise { | |
z-index: 99999; | |
position: absolute; | |
padding: 0 4px; | |
border-radius: 1px; |