Skip to content

Instantly share code, notes, and snippets.

View januswel's full-sized avatar
🚧
building products by building teams

Takagi Kensuke januswel

🚧
building products by building teams
View GitHub Profile
@januswel
januswel / gist_link_user_js.user.js
Created January 9, 2009 10:28 — forked from os0x/gist_link_user_js.user.js
nstall greasemonkey script easily in gist, and tell you the greasemonkey link to detail page in anyone's repository
/*
* test for Boost.Variant
*
* This sample needs recursive evaluations to execute, therefore there is a
* stack overflow risk.
*
* written by janus_wel<janus.wel.3@gmail.com>
* This source code is in public domain, and has NO WARRANTY.
* */
var SECOND_MILLISECOND = 1000,
MINUTE_MILLISECOND = 60 * SECOND_MILLISECOND,
HOUR_MILLISECOND = 60 * MINUTE_MILLISECOND,
DAY_MILLISECOND = 24 * HOUR_MILLISECOND,
WEEK_MILLISECOND = 7 * DAY_MILLISECOND,
YEAR_MILLISECOND = 365 * DAY_MILLISECOND;
/**
* @return {number}
* @param {number} year
@januswel
januswel / wma2mp3.sh
Created August 12, 2013 09:56
script to convert wma to mp3 with ffmpeg
#!/bin/sh
# default settings
BITRATE=128k
SAMPLING_RATE=44100
CHANNEL=2
# environments
COMMAND_NAME=$(basename $0)
@januswel
januswel / Animation.js
Created August 25, 2013 13:36
DOM アニメーション用クラス ref: http://qiita.com/janus_wel/items/57f134361ea070ebf666
var Animation = function Animation(element) {
this.element = element;
}
Animation.prototype = {
start: function (options) {
var dfd = $.Deferred();
this.endTime = Date.now() + options.duration;
this.options = options;
this.animation(options.action, options.duration, dfd);
@januswel
januswel / disable-selinux.yml
Created August 12, 2014 20:00
Ansible で Vagrant ホストを再起動する ref: http://qiita.com/janus_wel/items/cf5e0cf41ad771f92038
---
- name: disable SELinux
sudo: yes
selinux: state=disabled
- include: util/reboot.yml
@januswel
januswel / serverspec.yml
Created August 12, 2014 20:16
ansible-playbook の最後で serverspec を走らせる ref: http://qiita.com/janus_wel/items/04c4f88e46c8620011ed
---
- hosts: default
roles:
- common
- web
post_tasks:
- name: run serverspec
shell: cd /path/to/serverspec && bundle exec rake serverspec
delegate_to: 127.0.0.1
changed_when: false
@januswel
januswel / Vagrantfile
Created August 12, 2014 20:37
ssh config を汚さずに Ansible で Vagrant ホストを扱う ref: http://qiita.com/janus_wel/items/faac04f2ec2cdb50d074
config.vm.provision "ansible" do |ansible|
ansible.host_key_checking = false
ansible.playbook = "generate-inventory.yml"
end
@januswel
januswel / conf.yml
Created August 26, 2014 14:25
Ansible で設定をファイルに外出しする ref: http://qiita.com/janus_wel/items/405998b2ebd47dd8b8af
---
ip_address: 192.168.50.120
host_name: web01.example.com
@januswel
januswel / Vagrantfile
Created August 26, 2014 14:39
Vagrant で外部設定ファイルを扱う ref: http://qiita.com/janus_wel/items/b379ab090f588288bbb9
require 'yaml'
begin
conf = YAML.load_file(File.join(File.dirname(__FILE__), 'conf.yml'))
rescue Errno::ENOENT
# default settings
conf = {
'ip_address' => '192.168.50.100'
}
end