Skip to content

Instantly share code, notes, and snippets.

View darbio's full-sized avatar

JD darbio

View GitHub Profile
@darbio
darbio / integer.rb
Last active August 29, 2015 14:08 — forked from pithyless/integer.rb
class Integer
N_BYTES = [42].pack('i').size
N_BITS = N_BYTES * 16
MAX = 2 ** (N_BITS - 2) - 1
MIN = -MAX - 1
end
p Integer::MAX #=> 4611686018427387903
p Integer::MAX.class #=> Fixnum
p (Integer::MAX + 1).class #=> Bignum
@darbio
darbio / README.markdown
Created September 5, 2012 02:44 — forked from morkeleb/README.markdown
Bootstrap's Typeahead plugin extended (allowing for AJAX functionality) among other things

This is a fork of Bootstrap Typeahead that adds minimal but powerful extensions.

For example, process typeahead list asynchronously and return objects

  # This example does an AJAX lookup and is in CoffeeScript
  $('.typeahead').typeahead(
    # source can be a function
    source: (typeahead, query) ->
 # this function receives the typeahead object and the query string
@darbio
darbio / gist:3002292
Created June 27, 2012 07:53 — forked from monotocho/gist:3001973
Selected custom element
//********************
//Navigate to DVC1 !!!
//********************
namespace EMALI
{
public partial class vPtoVentaTipo : DialogViewController
{
public int PaginaIndex { get; set; }