Skip to content

Instantly share code, notes, and snippets.

<?php
echo 'hello';
@Sankame
Sankame / require_autoload.php
Created May 18, 2014 06:06
phalconでautoloadを読み込む。
<?php
require './vendor/autoload.php';
@Sankame
Sankame / php_debugbar.volt
Created May 18, 2014 06:12
phalconのviewテンプレートvoltにphp debugbarを埋め込む。
<html>
<head>
<?php echo $debugbarHeader ?>
</head>
<body>
<?php echo $debugbarBody ?>
</body>
</html>
/** Ajax POSTテスト */
function ajaxTest(){
$.ajax({
type : "POST",
url : "/test/",
data : {"test":"hoge"},
scriptCharset : "UTF-8",
success : function(msg, status){
var json = eval(msg);
<?php
Route::any(
"/test"
, function (){
Log::debug( Input::get('test') );
}
);
<?php
return array(
//Application Debug Mode
'debug' => true,
'url' => 'http://localhost',
);
<?php
class BaseController extends Controller {
public $layout='layout';
/**
* Setup the layout used by the controller.
*
* @return void
*/
@Sankame
Sankame / layout.blade.php
Created July 21, 2014 11:50
Laravel レイアウト用Bladeビュー抜粋
<!DOCTYPE html>
<html lang="en">
<head>
<script type="text/javascript">
<!--
var baseUrl = '{{BaseController::getBaseUrl()}}';
@Sankame
Sankame / hello.ts
Created June 25, 2015 15:30
【Angular2】クイックスタート
/// <reference path="typings/angular2/angular2.d.ts" />
import {Component, View, bootstrap} from 'angular2/angular2';
// Annotation section
@Component({
selector: 'my-app'
})
@View({
@Sankame
Sankame / currying_sample.scala
Created September 24, 2015 16:50
カリー化サンプル
●リスト1――カリー化する前の例
object myapp {
def main(args: Array[String]) = {
println("100から200までの合計:" + total(100, 200))
}
def total(min: Int, max: Int) = {
var res:Int = 0
for(n:Int <- Range(min,max + 1))