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
mkdir /perl | |
export PERLBREW_ROOT=/perl | |
curl -L --insecure http://xrl.us/perlbrewinstall | bash | |
echo 'export PERLBREW_ROOT=/perl' >> ~/.zshrc | |
echo '[ -f /perl/etc/bashrc ] && source /perl/etc/bashrc' >> ~/.zshrc | |
source ~/.zshrc | |
perlbrew available | |
perlbrew install perl-5.16.2 | |
perlbrew switch perl-5.16.2 | |
perlbrew install-cpanm |
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
#!/usr/local/bin/python | |
import requests | |
import json | |
def call_rabbitmq_api(host, port, user, passwd): | |
url = 'http://%s:%s/api/queues' % (host, port) | |
r = requests.get(url, auth=(user,passwd)) | |
return r |
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
# Install pyenv in ~/.pyenv | |
cd ~ | |
git clone git://github.com/yyuu/pyenv.git .pyenv | |
echo 'export PYENV_ROOT="${HOME}/.pyenv"' >> ~/.zshrc | |
echo 'if [ -d "${PYENV_ROOT}" ]; then' >> ~/.zshrc | |
echo ' export PATH=${PYENV_ROOT}/bin:$PATH' >> ~/.zshrc | |
echo ' eval "$(pyenv init -)"' >> ~/.zshrc | |
echo 'fi' >> ~/.zshrc |
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
%define _version 1.3.0 | |
%define _revision 1.3.0 | |
%define _release 1 | |
Name: riak | |
Version: %{_version} | |
Release: %{_release}%{?dist} | |
License: Apache License | |
Group: Development/Libraries | |
Source: %{name}-%{_revision}.tar.gz |
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
import functools | |
def calc(x, y, mode): | |
if mode == '+': | |
return x + y | |
elif mode == '-': | |
return x - y | |
elif mode == '*': | |
return x * y | |
elif mode == '/': |
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
import functools | |
def ore(func): | |
@functools.wraps(func) | |
def wrapper(*args, **kwargs): | |
print "@ore : oreoreoreoreore" | |
return func(*args, **kwargs) | |
return wrapper | |
def plus(x, y): |
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
--- spec_helper.rb.org 2013-11-04 19:21:50.000000000 +0900 | |
+++ spec_helper.rb 2013-11-04 23:01:26.000000000 +0900 | |
@@ -6,12 +6,9 @@ | |
include Serverspec::Helper::DetectOS | |
RSpec.configure do |c| | |
- if ENV['ASK_SUDO_PASSWORD'] | |
- require 'highline/import' | |
- c.sudo_password = ask("Enter sudo password: ") { |q| q.echo = false } | |
- else |
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
#!/usr/bin/env python | |
#-*- coding: utf-8 -*- | |
import pycontrol.pycontrol as pc | |
import os | |
host = 'xxx.xxx.xxx.xxx' | |
user = 'xxxxxx' | |
password = 'xxxxxx' |
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 'rake' | |
require 'rspec/core/rake_task' | |
require 'yaml' | |
require 'highline/import' | |
properties = YAML.load_file('properties.yaml') | |
ENV['SSH_USER'] = ask("Enter ssh user: ") { |q| q.echo = true } | |
ENV['SSH_PASSWORD'] = ask("Enter ssh password: ") { |q| q.echo = 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
package main | |
import ( | |
"log" | |
"net/http" | |
//"io/ioutil" | |
) | |
func get(url string, c chan bool){ | |
resp, err := http.Get(url) |
OlderNewer