Skip to content

Instantly share code, notes, and snippets.

View iwa4's full-sized avatar

p3 iwa4

  • Sansan, Inc.
  • Kyoto, Japan
View GitHub Profile

1 on 1


Why

  • お互いの理解を深め、チームを強くする
    • 普段話しにくいことを話す
  • こんな問題を解決したい
  • 業務優先度の理解に差が出る
@iwa4
iwa4 / gist:6dc1cac175f4b6f19d33
Created October 8, 2014 09:30
BOM が2つ付いているか検索するよ
find . -name '*.cshtml' | xargs grep -rl $'\xEF\xBB\xBF\xEF\xBB\xBF'
BTW yum has last Redis too, remi repository at least.
$ sudo -i
$ yum list redis
$ redis.x86_64 2.6.13-1.el6.remi remi
But today we want compile redis from source (see http://redis.io/download)
$ yum install make gcc tcl
$ cd /usr/local/src
@iwa4
iwa4 / GetCarrierIpAddress.cs
Created April 10, 2014 00:58
携帯キャリアのモバイルIPアドレスを取得するやーつ
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text.RegularExpressions;
using System.Xml.Linq;
using Sgml;
namespace SgmlReaderTest
{
internal class Program
@iwa4
iwa4 / backup.ps1
Last active December 28, 2015 18:09
PowelShell で UNC パスのフォルダをプログレスバー付きでコピーする
#================================
# Properties
#================================
Properties {
$target_server = "\\" + $target_server
$target_username = $target_server + "\username" # 指定されたログオン セッションは存在しません。
# そのセッションは既に終了している可能性があります。
# の エラー回避のため、domain name を付与してユーザー名を指定する
$target_password = "password"
$target_src = "$target_server\c$\hoge"
var express = require('express'),
wines = require('./routes/wines');
var app = express();
app.get('/wines', wines.findAll);
app.get('/wines/:id', wines.findById);
app.listen(3000);
console.log('Listening on port 3000...');
var http = require('http');
http.createServer(function (req, res) {
res.writeHead(200, {'Content-Type': 'text/plain'});
res.end('Hello World\n');
}).listen(3000, '127.0.0.1');
console.log('Server running at http://127.0.0.1:3000/');
{
"name": "wine-cellar",
"description": "Wine Cellar Application",
"version": "0.0.1",
"private": true,
"dependencies": {
"express": "3.x"
}
}
@iwa4
iwa4 / server.js
Last active December 19, 2015 13:48 — forked from ccoenraets/server.js
"use strict";
var express = require('express')
, wine = require('./routes/wines');
var app = express();
app.configure(function () {
app.use(express.logger('dev')); /* 'default', 'short', 'tiny', 'dev' */
app.use(express.bodyParser());
"use strict";
var mongoose = require('mongoose');
// Default Schemaを取得
var Schema = mongoose.Schema;
// Defaultのスキーマから新しいスキーマを定義
var WineSchema = new Schema({
name: String