Skip to content

Instantly share code, notes, and snippets.

View tao-s's full-sized avatar
🏠
Working from home

Tao Sasaki tao-s

🏠
Working from home
View GitHub Profile
@tao-s
tao-s / get_file_data.php
Last active February 12, 2016 08:22
Fileの一覧吐く
<?php defined('C5_EXECUTE') or die("Access Denied.");
namespace Application\Controller;
use Concrete\Core\File\FileList;
class GetFileDataContoroller {
public function index(){
$fl = new FileList();
@tao-s
tao-s / app.php
Created February 12, 2016 07:19
サイトマップ生成イベントへのリスナー登録のサンプル
<?php
/**
* ----------------------------------------------------------------------------
* # Custom Application Handler
*
* You can do a lot of things in this file.
*
* ## Set a theme by route:
*
@tao-s
tao-s / hhvm_php.ini
Last active August 29, 2015 14:25 — forked from tektoh/hhvm_php.ini
; php options
session.save_handler = files
session.save_path = /var/lib/php5
session.gc_maxlifetime = 1440
short_open_tag = On
expose_php = Off
; hhvm specific
hhvm.log.level = Warning
@tao-s
tao-s / calc.html
Created March 21, 2015 21:37
CSS3 calc()
<!DOCUTYPE HTML>
<html>
<head>
<title>CSS3 calc()って知ってた?</title>
<style>
* {
margin: 0;
padding: 0;
}
html,body{
@tao-s
tao-s / ほげ.php
Created March 10, 2015 11:38
これが動くんか...
<?php
class ほげ{
var $プロパティ;
function ほげ(){
$this->プロパティ = "ほげ";
}
@tao-s
tao-s / fizzbuzz.php
Created January 23, 2015 20:33
Fizz Buzz 問題
<?php
for($i=1;$i<=100;$i++){
if(($i%3)==0){
echo "Fizz";
}
if(($i%5)==0){
echo "Buzz";
}elseif(($i%3)>0){
echo $i;
}
@tao-s
tao-s / slide.md
Created April 29, 2014 08:16 — forked from tai2/slide.md
<?php
$uh = Loader::helper('concrete/urls');
$url = $uh->getToolsURL('disable_mobile') . '?rcID=' . $c->getCollectionID();
?>
<a href="<?php echo $url; ?>"><?php echo t('View desktop site'); ?></a>
@tao-s
tao-s / view.php
Last active August 29, 2015 13:57
A sample block view file for concrete5 add-on "Data".
<?php defined('C5_EXECUTE') or die("Access Denied.");
//Load Data models in package
Loader::model("data_list","data");
Loader::model("data_type","data");
//Create DataType object
$dataType = new DataType;
//load DataType by handle
$dataType->Load('dtHandle=?', array("object"));