Skip to content

Instantly share code, notes, and snippets.

View n0bisuke's full-sized avatar
🌴
On vacation

n0bisuke n0bisuke

🌴
On vacation
View GitHub Profile
@n0bisuke
n0bisuke / hoge.html
Created October 11, 2013 01:52
gistの
<!doctype html>
<html lang="ja">
<head>
<meta charset="UTF-8">
<title>Document</title>
</head>
<body>
</body>
</html>
<h3>[use for()]</h3>
<?php
//配列を用意
$moriken_p[0] = "moriken";
$moriken_p[1] = "e-learning";
$moriken_p[2] = "ganriser";
$moriken_p[3] = "http://sakumon.jp/app";
//配列の中身をforで取得
$count = count($moriken_p); //配列の個数を取得
@n0bisuke
n0bisuke / gisttest.html
Created October 17, 2013 12:43
gisttest
[gist id=7024241]
[gist]http://gist.github.com/7024241[/gist]
@n0bisuke
n0bisuke / cakephp_hasmany_test.php
Created October 17, 2013 15:26
hasmany and order
<?php
function find_plus_all($id){//グループとグループに属する試験
$hasMany = array(
//試験テーブルと結合
'AutoExam' => array(
'className' => 'AutoExam',
'foreignKey' => 'group_id',
'order' => array(
'name' => 'DESC',
)
@n0bisuke
n0bisuke / posted.php
Created October 21, 2013 08:09
てすとです
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Document</title>
</head>
<body>
<?php echo $_POST["hoge"]; ?>
ふくさかが課題おわんねーってよ
</body>
<?php
class HelloController extends AppController {
public $name = "Hello";
//public $uses = null;
public $components = array('DebugKit.Toolbar'); //DebugKitの適用
function index(){
echo "aaaa";
}
}
@n0bisuke
n0bisuke / main.css
Created November 4, 2013 16:34
main.css
#main {
width: 90%; }
#main p {
font-size: 14px; }
@n0bisuke
n0bisuke / main.scss
Created November 4, 2013 16:28
sass test
#main{
width: 90%;
p{
font-size: 14px;
}
}
@n0bisuke
n0bisuke / main.css
Created November 4, 2013 16:40
main.css
#main {
width: 90%;
}
#main p {
font-size: 14px;
}
@n0bisuke
n0bisuke / old.php
Created November 5, 2013 05:20
old.php
<?php
// index.php
$link = mysql_connect('localhost', 'myuser', 'mypassword');
mysql_select_db('blog_db', $link);
$result = mysql_query('SELECT id, title FROM post', $link);
?>