This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var data = [1, 2, 3, 4]; | |
for (var i = 0; i < data.length(); i++) { | |
if (data[i] % 2) { | |
delete data[i]; | |
} | |
} | |
console.log(data); // 2, 4 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<div class="block"> | |
hello | |
</div> | |
<div class="block2"> | |
hello | |
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
div.buttons | |
a.button--general sample | |
a.button--important sample | |
a.button--navigate sample | |
a.button--payment sample |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
div.buttons | |
a.button--general sample | |
a.button--important sample | |
a.button--navigate sample | |
a.button--payment sample |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var http = require("http"); | |
var express = require("express"); | |
var morgan = require("morgan"); | |
morgan.format("orig-format", "[:date] :method :url :status :response-time ms"); | |
app = express(); | |
app.use(morgan("orig-format")); | |
app.get("/", function (req, res) { | |
res.send("Hello World\n"); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
div.wrapper | |
article.contents | |
header.contents__header | |
h1.title title | |
div.contents__body | |
section | |
h3 超長い文章 | |
div.iscroll-content | |
div.scroller | |
p ぶんしょう |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
div.wrapper | |
article.contents | |
header.contents__header | |
h1.title title | |
div.contents__body | |
section.section | |
h3.section__title 超長い文章 | |
div.section__body.iscroll-content | |
div.scroller | |
p ぶんしょう |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
app.psgi | |
```perl | |
use Amon2::Lite; | |
post '/api/user/', sub { | |
my ($c, $args) = @_; | |
my $params = $c->req->parameters; | |
my $user = $c->db->select_row('SELECT * FROM `user` FROM `name` = ?', [$params->{name}]); | |
return $c->create_response(409) if $user; | |
$c->db->query('INSERT INTO `user` (`name`, `email`) VALUES (?, ?)', [$params->{name}, $params->{email}]); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env ruby | |
# | |
# adb logcat をもっと見やすく. | |
# | |
require 'optparse' | |
# | |
# global option. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Backbone.Pjax = (function () { | |
"use strict"; | |
var History = Backbone.History.extend({ | |
"navigate": function(fragment, options) { | |
if (!Backbone.History.started) return false; | |
if (!options || options === true) options = {trigger: options}; | |
fragment = this.getFragment(fragment || ''); | |
if (this.fragment === fragment) return; | |
this.fragment = fragment; |