Skip to content

Instantly share code, notes, and snippets.

View 59naga's full-sized avatar
🏠
Working from home

Hiroyuki Usui 59naga

🏠
Working from home
  • Japan/Tokyo(JST)
View GitHub Profile
@rauchg
rauchg / README.md
Last active January 6, 2024 07:19
require-from-twitter
<html>
<body>
<div id="audioElementList"></div>
<input type="text" id="userInput">
<button id="connectButton">connect</button>
</body>
<script src="https://code.jquery.com/jquery-2.2.0.min.js"></script>
<script src="http://cdn.peerjs.com/0.3/peer.js"></script>
<script type="text/javascript">
@fand
fand / no-japanese.js
Last active June 1, 2016 10:51
日本語禁止するESLintルール
/**
* @fileoverview Rule to forbid writing Japanese
* @author amagitakayosi
*/
"use strict";
var path = require('path');
//------------------------------------------------------------------------------
@jcollado
jcollado / email.js
Last active April 3, 2024 15:21
Send email with nodemailer and AWS SES (API or STMP)
var nodemailer = require('nodemailer');
var sesTransport = require('nodemailer-ses-transport');
var smtpPassword = require('aws-smtp-credentials');
var mailOptions = {
from: 'from@example.com',
to: 'to@example.com',
text: 'This is some text',
html: '<b>This is some HTML</b>',
};
@niwaringo
niwaringo / karma.conf.js
Last active August 29, 2015 14:15
Karmaを使ってSauceLabsの同時接続上限にかからないようにテストを実行する。
module.exports = function(config) {
var customLaunchers = require('./saucebrowsers.js');
config.set({
basePath: '',
frameworks: ['mocha', 'browserify'],
files: [./**/*.js],
exclude: [],
preprocessors: {},
port: 9876,
colors: true,
@mlynch
mlynch / autofocus.js
Last active August 24, 2022 15:03
AngularJS Autofocus directive
/**
* the HTML5 autofocus property can be finicky when it comes to dynamically loaded
* templates and such with AngularJS. Use this simple directive to
* tame this beast once and for all.
*
* Usage:
* <input type="text" autofocus>
*
* License: MIT
*/
<?php
var_dump(get_defined_constants());
var_dump(get_declared_classes());
var_dump(get_declared_interfaces());
var_dump(get_declared_traits());
var_dump(get_defined_functions());
var_dump(get_defined_vars());
var_dump(get_included_files());
var_dump(get_required_files());
var_dump(get_loaded_extensions());
FROM centos
MAINTAINER hatena@iti.co.jp
ENV http_proxy http://proxy.example.com
ENV https_proxy http://proxy.example.com
RUN yum update -y
RUN yum install -y openssh-server httpd php php-mbstring mysql-server php-mysql python-setuptools
RUN yum clean all
RUN easy_install supervisor
@demouth
demouth / boom.sh
Created February 11, 2014 17:30
爆発しろ!という気持ちを鎮める為のシェル。 このシェルを叩くとランダムで生成された爆発のアニメーションが描画されます。
#!/bin/bash
#2つの引数の間の数値をランダムで返す
#第一引数の方がより小さな値を渡すこと
function rand() {
range=$(($1 - $2))
ret=$((RANDOM % range + $1))
echo $ret
}
@mohayonao
mohayonao / README.md
Created December 20, 2013 21:48
CoffeeCollider勉強会(2013.12.20)用のスライド