Skip to content

Instantly share code, notes, and snippets.

@skylock
skylock / ReadMe.md
Last active September 11, 2023 13:51 — forked from devinrhode2/README.md
How to Change Open Files Limit on OS X and macOS Sierra (10.8 - 10.12)

How to Change Open Files Limit on OS X and macOS

To check the current limits on your Mac OS X system, run in terminal:

launchctl limit maxfiles
ulimit -a

Steps

@snoozer05
snoozer05 / gist:ca9860c57683e4221d10
Last active August 29, 2015 14:03
Ruby commit count until 2.1.0-p0
* 1: nobu 1870
* 2: akr 716
* 3: nagachika 488
* 4: svn 449
* 5: ko1 423
* 6: naruse 339
* 7: zzak 290
* 8: usa 276
* 9: kazu 149
* 10: drbrain 114

I appreciate all form of contribution, but for some contributors a greater sense of awareness about how OSS works would go a long way. The more you leave undone in a pull request or the more you leave unanswered in a bug report, the more “work in progress” your contribution adds to a project.

So for example, say you report a bug, but you only explain it with a sentence or two of english -- no stack trace, no minimal example reproducing the problem, and no tests. At that point, there’s nothing I can do except ask you to provide more information to help me investigate further, unless your problem is very obvious the moment I look at it.

Once we at least have the means to reproduce a bug, we need to make sure it’s isolated and not coming from some lower level problem. That means writing further sets of examples, and poking around in the source until we’re fairly sure where the bug is coming from.

Once that source of the problem has been identified, we need to work on a fix, but we need to take care to make

@denisdefreyne
denisdefreyne / allocations.d
Last active December 15, 2015 18:29
This is a DTrace script for Ruby 2.0 that profiles object allocations.
#pragma D option dynvarsize=100m
dtrace:::BEGIN
{
self->depth = 0;
}
ruby*:::method-entry
{
self->depth++;
@nurse
nurse / gist:4324519
Last active February 28, 2018 11:53
ぼくの考えた最強のRuby新機能案

ぼくの考えた最強のRuby新機能案

野心的な新機能案や、互換性等の理由でおよそ採用されないであろう夢を書き連ねています。

Remove Fixnum and Bignum

Fixnum と Bignum を削除して、Integer クラスに統合する。両者は Flonum のように内部的に切り替えられる。

1 / 2 is Rational

Integer#/ の結果を Rational で返すようにする。 https://bugs.ruby-lang.org/issues/5512#change-37021

###
# Scheme code is translated to YARV byte code, then evaluated in the
# Ruby Virtual Machine
require 'rbconfig'
require 'dl'
require 'fiddle'
require 'strscan'
class RubyVM
require 'fiddle'
require 'minitest/autorun'
class RubyVM
class InstructionSequence
address = Fiddle::Handle::DEFAULT['rb_iseq_load']
func = Fiddle::Function.new(address, [Fiddle::TYPE_VOIDP] * 3, Fiddle::TYPE_VOIDP)
define_singleton_method(:load) do |data, parent = nil, opt = nil|
func.call(Fiddle.dlwrap(data), parent, opt).to_value
@unak
unak / history.txt
Last active November 29, 2021 01:40
The History of Ruby
* Only the releases of the stable versions are listed in principle. The releases of the unstable versions especially considered to be important are indicated as "not stable."
* The branches used as the source of each releases are specified, and the branching timing of them are also shown. BTW, before subversionizing of the repository, the term called "trunk" was not used, but this list uses it in order to avoid confusion.
* In order to show a historical backdrop, big conferences (RubyKaigi, RubyConf and Euruko) are also listed. About the venues of such conferences, general English notations are adopted, in my hope.
* ruby_1_8_7 branch was recut from v1_8_7 tag after the 1.8.7 release because of an accident.
* 1.2.1 release was canceled once, and the 2nd release called "repack" was performed. Although there were other examples similar to this, since the re-releases were performed during the same day, it does not write clearly in particular.
* Since 1.0 was released with the date in large quantities, the mi
#!/usr/bin/env ruby
# -*- coding: utf-8 -*-
require 'fiber'
module Lazy
module Enumerable
def lazy(method = :each)
Lazy::Enumerator.new do
if block_given?
Fiber.yield yield while true
#!/usr/bin/env ruby
#
# A quick script to dump an overview of all the open issues in all my github projects
#
require 'octokit'
require 'awesome_print'
require 'rainbow'