Skip to content
#! /usr/bin/env ruby
require 'bundler'
paths = Bundler.load.specs.map(&:full_gem_path)
system("ack '#{ARGV[0]}' #{paths.join(' ')}")
local pid = io.open('/proc/self/stat'):read('*all'):gmatch('%d+')()
print(io.popen('ps -p ' .. pid .. ' -o cmd,vsz,rss'):read('*all'))
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
# Not needs as there is 'Copy as Curl' in Chrome now
sqlite3 -separator ' ' ~/.config/google-chrome/Default/Cookies 'select host_key, "TRUE", path, "FALSE", expires_utc, name, value from cookies'
irb(main):009:0> 1/BigDecimal.new('0')
=> #<BigDecimal:b36d598,'Infinity',9(36)>
irb(main):010:0> 1/0
ZeroDivisionError: divided by 0
$ 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'
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)
<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}?"
>
<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>
BigDecimal.class_eval do
def inspect
to_s
end
end
Something went wrong with that request. Please try again.