Skip to content

Instantly share code, notes, and snippets.

require 'active_record' #ActiveRecordを使用
require 'logger' #Logを使用
#テーブルに対する定義
ActiveRecord::Base.establish_connection(
"adapter" => "sqlite3",
"database" => "./blog.db"
)
#これでActiveRecord内のログを吐き出してくれます。
console.log "Hello World"
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Study Calendar</title>
<script src="jquery.js"></script>
<script src="calendar.js" type="text/javascript"></script>
</head>
<body>
</body>
$(document).ready(function(){
var tableStyle = {
'width':'900px',
'height':'400px',
'border-collapse':'collapse',
'font-family':'Monaco'
};
var yearMonth = {
'height':'50px',
<!DOCTYPE html>
<html lang="ja">
<meta charset="UTF-8">
<title>AngularJSで作るTodoアプリ</title>
<link rel="stylesheet" type="text/css" href="main.css">
<script type="text/javascript" src="angular.mim.js"></script>
<script type="text/javascript" src="Main.js"></script>
<head>
</head>
<body>
<style>
div.menuBox{
width:calc(100%/4);
height:40px;
float:left;
font-size:20px;
text-align:center;
line-height:40px;
transition:border-bottom linear 1s,color linear 1s;
}
<!DOCTYPE html>
<html lang="ja">
<head>
<meta charset="utf-8" />
<title>Canvas practise</title>
<script src="jquery.min.js"></script>
<script type="text/javascript">
const NUM = 40;
const WIDTH = 300;
const HEIGHT = 400;
<!DOCTYPE html>
<html lang="ja">
<head>
<meta charset="utf-8">
<title>jCanvasの練習</title>
<script src="jquery.min.js"></script>
<script src='jcanvas.min.js'></script>
</head>
<body>
<canvas width="300" height="300"></canvas>
var time = moment(); //これで現在の時間を取得できます。
time.get('year'); //今年が何年か取得
time.get('y'); //これでもイケる!
//2015/06/09
console.log(time.format('YYYY/MM/DD'));
//11:44:16
console.log(time.format('hh:mm:ss'));
$(document).ready(function(){
/*
* In this js file, two plugins are combined
* 1. moment.js
* 2. jCanvas.js
* to make COOL CLOCK :)
*/
//to see what's going on.
var log = function(x){console.log(x)};