This file contains hidden or 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
*** ruby-1.9.3-p484.origin/file.c 2013-07-10 10:33:05.000000000 +0900 | |
--- ruby-1.9.3-p484/file.c 2014-02-03 14:17:21.054461600 +0900 | |
*************** | |
*** 4126,4132 **** | |
#ifdef __CYGWIN__ | |
#include <winerror.h> | |
! extern unsigned long __attribute__((stdcall)) GetLastError(void); | |
#endif |
This file contains hidden or 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
*** ruby-2.0.0-p353/file.c.origin 2014-02-03 14:10:23.019204500 +0900 | |
--- ruby-2.0.0-p353/file.c 2014-02-03 14:10:50.577250200 +0900 | |
*************** | |
*** 4181,4187 **** | |
#ifdef __CYGWIN__ | |
#include <winerror.h> | |
! extern unsigned long __attribute__((stdcall)) GetLastError(void); | |
#endif |
This file contains hidden or 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/ruby | |
require 'thread' | |
class ThreadPool | |
def initialize(size, &session) | |
@size = size | |
@queue = SizedQueue.new(size) | |
@map = {} | |
@map_mutex = Mutex.new | |
session.call(self) |
This file contains hidden or 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
#pragma once | |
#include <cstdio> | |
#include <iostream> | |
#include <memory> | |
#include <stdexcept> | |
class invalid_command : std::runtime_error { | |
public: | |
invalid_command(const std::string &cause) |
This file contains hidden or 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
# lib/capistrano/rvm.cap | |
namespace :rvm do | |
desc 'RVM install in :rvm_type or :rvm_custom_path' | |
task :install do |host| | |
on roles(:app) do | |
rvm_path = '~/.rvm' | |
#rvm_path = '/usr/local/rvm' if :rvm_type == :system | |
#rvm_path = :rvm_custom_path if :rvm_custom_path | |
rvm_dir = File.dirname(rvm_path) | |
execute "mkdir -p #{rvm_path} && cd #{rvm_dir} && curl -L https://get.rvm.io | bash" |
This file contains hidden or 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
##### hello.rb | |
#!/usr/bin/env ruby | |
require 'daemons' | |
require 'logger' | |
# Initialize | |
logpath = File.expand_path("app.log") | |
log = Logger.new(logpath) | |
log.info("Completely initialized") |
This file contains hidden or 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
#pragma once | |
#include <iostream> | |
#include <string> | |
#include <memory> | |
#include <cstdio> | |
#include <cstdarg> | |
using namespace std; |
NewerOlder