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
| local pid = io.open('/proc/self/stat'):read('*all'):gmatch('%d+')() | |
| print(io.popen('ps -p ' .. pid .. ' -o cmd,vsz,rss'):read('*all')) |
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
| module I18n | |
| class JustRaiseExceptionHandler < ExceptionHandler | |
| def call(exception, locale, key, options) | |
| if exception.is_a?(MissingTranslation) | |
| raise exception.to_exception | |
| else | |
| super | |
| end | |
| end | |
| 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
| irb(main):009:0> 1/BigDecimal.new('0') | |
| => #<BigDecimal:b36d598,'Infinity',9(36)> | |
| irb(main):010:0> 1/0 | |
| ZeroDivisionError: divided by 0 |
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
| $ mkdir -p ~/.irssi/scripts/autorun/ | |
| $ cd ~/.irssi/scripts/autorun/ | |
| $ wget http://wouter.coekaerts.be/irssi/scripts/trigger.pl | |
| $ irssi | |
| /server add -auto -network Freenode irc.freenode.net 6667 | |
| /channel add -auto ##channel Freenode | |
| /SET autolog ON | |
| /trigger add -joins -command 'exec -o tail -10 ~/irclogs/Freenode/\#\#channel.log' |
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 'stamp' | |
| require 'text-table' | |
| def how(ts) | |
| hour = (ts.to_f / 3600).floor | |
| hour % 24 + ((hour / 24 + 4).floor % 7) * 24 | |
| end | |
| from = Time.utc(2013, 4, 7) | |
| to = Time.utc(2013, 4, 7 + 7) |
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
| <SCRIPT | |
| language='JavaScript1.1' | |
| SRC="http://ad-ace.doubleclick.net/adj/N4892.273606.INFECTIOUSMEDIA1/B7321384.500;sz=300x250;ord=123123123;click=http%3A%2F%2F127.0.0.1.xip.io%2Ftracker%3Furl%3D;?" | |
| > | |
| </SCRIPT> | |
| <A | |
| HREF="${IDB:CLICK_URL}http://ad-ace.doubleclick.net/jump/N4892.273606.INFECTIOUSMEDIA1/B7321384.500;sz=300x250;ord=${IDB:CACHEBUSTER}?" | |
| > |
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
| <html> | |
| <body> | |
| <script type="text/javascript" src="https://d1nzfe00velrsn.cloudfront.net/media/942Acxp9ha5yps88uWdE/fpsp.js"></script> | |
| <script type="text/javascript"> | |
| __im_ebJnNptPjSUMVa2nHWjf.send('https://secure.adnxs.com/getuid?', {uid: '$UID', oid: 'DANROCKS'}); | |
| </script> | |
| </body> | |
| </html> |
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
| BigDecimal.class_eval do | |
| def inspect | |
| to_s | |
| end | |
| 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
| extract :DWAPI do | |
| get 'Siphon' | |
| limit 2 | |
| resolve do |response| | |
| rows = [] | |
| p response | |
| response.each do |input| | |
| p input | |
| name = input[:name] |