Skip to content

Instantly share code, notes, and snippets.

View masarufuruya's full-sized avatar

masarufuruya

View GitHub Profile
/**
* Template Name: contact
*/
@masarufuruya
masarufuruya / file0.css
Created June 11, 2016 10:03
CSSで!importantを使わないために意識していること ref: http://qiita.com/masarufuruya/items/cafedaf906f4b2267304
/*リセットCSS(一部利用)*/
html, body, div, span, iframe,
h1, h2, h3, h4, h5, h6, p, blockquote, pre,
a, address, big, img, dl, dt, dd, ol, ul, li,
form, label,table, tbody, tfoot, thead, tr,
th, td {
margin: 0;
padding: 0;
border: 0;
outline: 0;
@masarufuruya
masarufuruya / file0.txt
Created April 12, 2016 12:50
Railsのメール配信サーバーについてメモ書き ref: http://qiita.com/masarufuruya/items/3150f72104e3ca453c68
sendmail
qmail
PostFix
@masarufuruya
masarufuruya / file0.txt
Last active March 23, 2016 04:47
Cakephpにマイグレーションを使う ref: http://qiita.com/masarufuruya/items/013e2ad9614981966bde
Console/cake Migrations.migration run all -p
# Haml
gem 'haml-rails'
rake assets:precompile
@masarufuruya
masarufuruya / file0.php
Last active February 15, 2016 09:55
CakePHPでモデルのUnitTestを行う ref: http://qiita.com/masarufuruya/items/62fa6f137048a50dcc56
<?php
class Article extends AppModel {
public function published($fields = null) {
$params = array(
'conditions' => array(
$this->name . '.published' => 1
),
'fields' => $fields
);
@masarufuruya
masarufuruya / file0.js
Last active January 21, 2016 10:16
RequireJS,Browerify,webpackってそもそも何なの?という人向けのまとめ ref: http://qiita.com/masarufuruya/items/b1f4195ea8c59431b464
$(function() {
// イベントハンドラ
$("#button").on("click", function(){
$.ajax({
url: url,
dataType: "json",
}).done(function(results){
// 表示
$.each(results, function(result) {
$('<li>')
@masarufuruya
masarufuruya / file0.php
Created January 17, 2016 14:23
CakePHPのsaveメソッドとcreateメソッドの基礎 ref: http://qiita.com/masarufuruya/items/4cd66ee7956bf9c11441
$test = array(
[ModelName] => array(
[fieldname1] => 'value',
[fieldname2] => 'value2',
)
);
var sayHelloShared = function() {
console.log('Hello' + this.name);
};
var human = {
sayHello: sayHelloShared,
name: 'masaru',
};
human.sayHello();