This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ==UserScript== | |
// @name github monkey | |
// @namespace http://github.com/janus_wel | |
// @description install greasemonkey script easily in gist, and tell you the greasemonkey link to detail page in anyone's repository | |
// @include http://github.com/* | |
// @include http://gist.github.com/* | |
// @include https://gist.github.com/* | |
// ==/UserScript== | |
(function() { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* 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. | |
* */ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# default settings | |
BITRATE=128k | |
SAMPLING_RATE=44100 | |
CHANNEL=2 | |
# environments | |
COMMAND_NAME=$(basename $0) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
- name: disable SELinux | |
sudo: yes | |
selinux: state=disabled | |
- include: util/reboot.yml |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
- 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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
config.vm.provision "ansible" do |ansible| | |
ansible.host_key_checking = false | |
ansible.playbook = "generate-inventory.yml" | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
ip_address: 192.168.50.120 | |
host_name: web01.example.com |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
OlderNewer