Skip to content

Instantly share code, notes, and snippets.

View bobo52310's full-sized avatar
🎯
Focusing

Bobo Chen (陳柏宏) bobo52310

🎯
Focusing
View GitHub Profile
@bobo52310
bobo52310 / task_lists.md
Created July 11, 2015 03:43
[GitHub Flavored Markdown] Task Lists
  • @mentions, #refs, links, formatting, and tags supported
  • list syntax required (any unordered or ordered list supported)
  • this is a complete item
  • this is an incomplete item
@bobo52310
bobo52310 / gist:7ce33142c9d53f15b04e
Last active August 29, 2015 14:23
Listing all views files (使用 Laravel 和前端分工)
<?php
/*
* 增加以下兩個 routing 關聯,方便檢視 prototype 底下的檔案
*/
# 列出所有 prototype 檔案,位在/resources/views/prototype/*
Route::get('/', function(){
$full_path = base_path().'/resources/views/prototype';
$filesInFolder = \File::files($full_path);
@bobo52310
bobo52310 / gist:61fa448021facde499b5
Last active February 24, 2021 03:21
Laravel Coding Style and Naming Guidelines 整理

#Laravel Coding Style

據英國研究統計,工程師每天花費最多時間就是在 Naming,變數的命名、Function 的命名... 而且很容易發生爭執 我這邊參考了 PHP 常見的 Framework 整理出一份 Guidelines,來當做我們團隊的 Naming Guidelines,讓大家在開發時可以有個準則放在心上:

Naming Guidelines

  • ClassName:使用 PascalCase。
  • methodName:使用 camelCase。 >* propertyName:使用 camelCase。
@bobo52310
bobo52310 / 0_reuse_code.js
Last active August 29, 2015 14:19
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
@bobo52310
bobo52310 / schema_posts.skema
Created April 6, 2015 07:38
Laravel-workshop-schema-posts
[{"name":"posts","color":"Red","position":{"x":100,"y":100},"increment":true,"timestamp":true,"softdelete":false,"column":[{"name":"id","type":"increments","length":"","defaultvalue":"","enumvalue":"","ai":false,"pk":false,"nu":false,"ui":false,"in":false,"un":false,"fillable":false,"guarded":false,"visible":false,"hidden":false,"colid":"c27","order":0},{"name":"title","type":"string","length":"","defaultvalue":"","enumvalue":"","ai":false,"pk":false,"nu":false,"ui":false,"in":false,"un":false,"fillable":false,"guarded":false,"visible":false,"hidden":false,"colid":"c35","order":1},{"name":"content","type":"text","length":"","defaultvalue":"","enumvalue":"","ai":false,"pk":false,"nu":false,"ui":false,"in":false,"un":false,"fillable":false,"guarded":false,"visible":false,"hidden":false,"colid":"c43","order":2},{"name":"category_id","type":"integer","length":"","defaultvalue":"","enumvalue":"","ai":false,"pk":false,"nu":false,"ui":false,"in":false,"un":false,"fillable":false,"guarded":false,"visible":false,"hidd
@bobo52310
bobo52310 / gist:9e8290d416bd2b2fbaa2
Last active August 29, 2015 14:14
ST3 preferences
{
"auto_complete_selector": "source, text",
"bold_folder_labels": true,
"caret_extra_bottom": 3,
"caret_extra_top": 3,
"caret_extra_width": 2,
"color_scheme": "Packages/User/SublimeLinter/Monokai (SL).tmTheme",
"detect_slow_plugins": false,
"draw_white_space": "all",
"font_size": 17.0,
@bobo52310
bobo52310 / gist:377f83065b76a886c11a
Created December 30, 2014 06:48
raptor-S3 can't be a Authenticated Users (2-2)
<?php
$bucket = 'bobo-bucket-test';
$buckerUrl = 'https://s3-ap-northeast-1.amazonaws.com/bobo-bucket-test/';
// These can be found on your Account page,under Security Credentials > Access Keys
$accessKeyId = '*** no show ***';
$secret = '*** no show ***';
if (!$bucket || !$buckerUrl || !$accessKeyId || !$secret) {
die('Amazon S3 credentials not setup in ' . basename(__FILE__));
@bobo52310
bobo52310 / gist:a331f6bae6221084c234
Created December 30, 2014 06:47
raptor-S3 can't be a Authenticated Users (1-2)
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Document</title>
<link rel="stylesheet" href="//ajax.googleapis.com/ajax/libs/jqueryui/1.11.2/themes/smoothness/jquery-ui.css" />
{{ HTML::style('assets/css/raptor-front-end.min.css') }}
</head>
<body>
@bobo52310
bobo52310 / gist:c919f838df574490c1c2
Last active August 29, 2015 14:11
raptor-editor-replace-textarea
<textarea class="form-control input" data-id="main-content" name="body" ></textarea>
<div class="raptor-editable">
<div class="raptor-editable input" style="background-color: rgba(245, 217, 165, 0.28);"></div>
</div>
<script>
$(document).ready(function() {
$('.raptor-editable').raptor({
autoEnable: true, // Enable the editor automaticly
unloadWarning: false,
@bobo52310
bobo52310 / gist:d894b5594abc3ba6932a
Created December 17, 2014 07:32
file_manager_error
Warning: require_once(/Users/bobochen/Desktop/github/raptor-example/..//raptor-themes/include.php): failed to open stream: No such file or directory in /Users/bobochen/Desktop/github/raptor-example/partials/head.php on line 15
Fatal error: require_once(): Failed opening required '/Users/bobochen/Desktop/github/raptor-example/..//raptor-themes/include.php' (include_path='.:/usr/local/Cellar/php55/5.5.19/lib/php') in /Users/bobochen/Desktop/github/raptor-example/partials/head.php on line 15