- npm
- grunt
- uglify
- bower
- n
- ユーティリティ
- lo-dash
- Q
- underscore.js
- マルチメディア
This file contains hidden or 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.get('/hoge.:format', function(req, res) { | |
res.format({ | |
json: function(req, res) { | |
res.send({a: 1}); | |
}, | |
html: function(req, res) { | |
// ブラウザから /index.json にアクセスしてもこっちが実行される | |
res.render('index'); | |
}, | |
default: function(req, res) { |
This file contains hidden or 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
#include <memory> | |
#include <iostream> | |
#include <string> | |
#include <unordered_map> | |
#include <unordered_set> | |
using namespace std; | |
class Node { | |
public: |
This file contains hidden or 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
$ brew install emacs --HEAD --cocoa | |
==> Cloning bzr://http://bzr.savannah.gnu.org/r/emacs/trunk | |
bzr: ERROR: Couldn't import bzrlib and dependencies. | |
Please check the directory containing bzrlib is on your PYTHONPATH. | |
Traceback (most recent call last): | |
File "/usr/local/bin/bzr", line 74, in <module> | |
import bzrlib | |
ImportError: No module named bzrlib | |
Error: Failure while executing: /usr/local/bin/bzr checkout --lightweight http://bzr.savannah.gnu.org/r/emacs/trunk /Library/Caches/Homebrew/emacs--bzr |
This file contains hidden or 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
XCODEROOT = %x[xcode-select -print-path].strip | |
SIM_SYSROOT = "#{XCODEROOT}/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator7.0.sdk/" | |
DEVICE_SYSROOT = "#{XCODEROOT}/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS7.0.sdk/" | |
MRuby::Build.new do |conf| | |
toolchain :gcc | |
conf.gembox 'default' | |
end |
This file contains hidden or 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
#include <iostream> | |
#include <functional> | |
#include <string> | |
#include <map> | |
#include <vector> | |
using namespace std; | |
struct Event { | |
Event(const string& name, int data) |
This file contains hidden or 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
{exists} = require('fs') | |
{EventEmitter} = require('events') | |
{resolve, join} = require('path') | |
{filter} = require('async') | |
http = require('http') | |
cordell = require('cordell') | |
{config} = require('./config') | |
class BrunchServer extends EventEmitter |
This file contains hidden or 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
fs = require 'fs' | |
gm = require 'gm' | |
im = gm.subClass imageMagick: true | |
{PassThrough} = require 'stream' | |
stream = fs.createReadStream '/Users/hadashi/tmp/20.png' | |
stream2 = new PassThrough | |
stream3 = new PassThrough |
This file contains hidden or 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
$(function() { | |
$('.lens-image').each(function() { | |
var img = this | |
, src = this.src | |
, loader = new Image; | |
if (!this.complete || (!img.naturalWidth === 0)) { | |
img.src = './img/animation.gif'; | |
loader.src = src; | |
loader.onload = function() { |
This file contains hidden or 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
convert -resize 323x323 -unsharp 2x1.4+0.5+0 hoge.png fuga.png |