Skip to content

Instantly share code, notes, and snippets.

View noda-sin's full-sized avatar
😀
Happy

Noda Shimpei noda-sin

😀
Happy
View GitHub Profile
@noda-sin
noda-sin / hello.js
Created November 23, 2012 02:45
第1回Node.js入門勉強会 レポート課題
var http = require('http');
server = http.createServer(function (req, res) {
res.writeHead(200, {'Content-Type': 'text/plain'});
res.end('Hello World\n');
req.socket.end();
});
server.on('connection', function(socket) {
server.close();
});
@noda-sin
noda-sin / gist:8351413
Last active January 2, 2016 19:39
iOS Memo

#Cocoapods

##kiwi

target :TargetTests, :exclusive => true do
   pod 'Kiwi'
end

TargetTestsの箇所は、該当のTarget名

# 少し凝った zshrc
########################################
# 環境変数
export LANG=ja_JP.UTF-8
# 色を使用出来るようにする
autoload -Uz colors
colors
@noda-sin
noda-sin / AWS-Vagrantfile
Last active August 29, 2015 14:06
AWS-Vagrantfile
# -*- mode: ruby -*-
# vi: set ft=ruby :
# change default provider to digital_ocean
ENV['VAGRANT_DEFAULT_PROVIDER'] = "aws"
# Vagrantfile API/syntax version. Don't touch unless you know what you're doing!
VAGRANTFILE_API_VERSION = "2"
Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
@noda-sin
noda-sin / gist:8f13daf9bd00c92dc8e8
Created November 13, 2014 14:14
Self-Signed-Certficate-Generator
http://www.selfsignedcertificate.com/
@noda-sin
noda-sin / serf
Last active August 29, 2015 14:10
Serf Init Script
#!/bin/sh
#
# chkconfig: - 89 11
# description: serf daemon
# processname: serf
# config: /etc/serf/serf.conf
# Default-Start:
# Default-Stop: 0 1 2 3 4 5 6
# Description: serf agent daemon
@noda-sin
noda-sin / auto-associate-address.sh
Created December 4, 2014 16:10
AWS Command Tools
#!/bin/sh
selfId=$(curl http://169.254.169.254/latest/meta-data/instance-id)
allocIds=$(aws ec2 describe-addresses | jq '[.Addresses[] | select(.AssociationId == null) | .AllocationId]')
allocLen=$(echo ${allocIds} | jq length)
if [ "${allocLen}" -eq 0 ]; then
echo 'Allocation address not found' 1>&2
exit 2
@noda-sin
noda-sin / gistodo.md
Last active August 29, 2015 14:16
テストtodo
  • a
  • b
  • 5
#!/bin/sh
yum -y install httpd php mysql php-mysql
chkconfig httpd on
service httpd start
cd /tmp
wget http://us-east-1-aws-training.s3.amazonaws.com/self-paced-lab-4/examplefiles-as.zip
unzip examplefiles-as.zip
mv examplefiles-as/* /var/www/html