Skip to content

Instantly share code, notes, and snippets.

View kamiyam's full-sized avatar
🏠
Working from home

kamiyam kamiyam

🏠
Working from home
View GitHub Profile
@kitak
kitak / build.md
Last active December 23, 2015 07:39
Apacheのソースコードビルドまとめ

iptables off

sudo /etc/init.d/iptables stop

事前にインストールが必要なもの

sudo yum groupinstall "Development Tools"
sudo yum install pcre-devel
@mikermcneil
mikermcneil / using-raw-socket-io-in-sails.js
Created September 17, 2013 18:32
Using raw socket.io functionality in a Sails.js controller
module.exports = {
/**
*
* Using raw socket.io functionality from a Sails.js controller
*
*/
index: function (req,res) {
@dougalcampbell
dougalcampbell / ds-duino.ino
Created September 10, 2013 17:37
Digispark and nodejs - talking to the Digispark Arduino-compatible microcontroller via USB with the node-hid library
/*
* Accept control commands via USB.
*
* Commands start with '!' and end with '.'
* Commands have three parts: action, pin, value: !AAPPVV.
*
* E.g. '!01p101.' is DigitalWrite, Pin1, value = 1
*
* Note: This is currently *very* crude. Much improvement could be made.
* I think the use of strncpy is eating a lot of memory. Refactor?
@Mantish
Mantish / AuthController.js
Last active December 21, 2015 21:09 — forked from theangryangel/AuthController.js
Sails.js (v0.9.3) authentication using Passportmiddleware
// api/controllers/AuthController.js
var passport = require('passport');
var AuthController = {
login: function (req,res)
{
res.view();
},
@konitter
konitter / grunt-memo.md
Last active December 13, 2015 21:08
grunt@0.4系(開発版)自分用メモ
@kenjiskywalker
kenjiskywalker / aws-ec2-vpc.md
Last active October 31, 2018 11:14
EC2をVPCにアサインして、EIP用のNetwork Interfaceを追加して外部と接続できるようにする

EC2をVPCにアサインして外部から接続する

VPCにアサインされたEC2インスタンスへ
Network Interfaceを追加し、外部からVPC内のインスタンスへ接続できるようにする。

画像がないのでわかりづらいけど自分用メモということで。

Q&A

@jlong
jlong / uri.js
Created April 20, 2012 13:29
URI Parsing with Javascript
var parser = document.createElement('a');
parser.href = "http://example.com:3000/pathname/?search=test#hash";
parser.protocol; // => "http:"
parser.hostname; // => "example.com"
parser.port; // => "3000"
parser.pathname; // => "/pathname/"
parser.search; // => "?search=test"
parser.hash; // => "#hash"
parser.host; // => "example.com:3000"