Re: http://twitter.com/hondallica/status/436117998823165952
クソコードを見たとき: "Looking at this code is pure agony!"
同僚がバグを直してくれた時: "You are an angel sent to save me!"
require 'fluent-logger' | |
require 'open-uri' | |
require 'nokogiri' | |
user = ENV['LF_USER'] | |
marker = ENV['LF_MARKER'] || File.expand_path('~/.lastfm_fluentd.mark') | |
last = if File.exist?(marker) | |
File.read(marker).chomp | |
else | |
nil |
util = require('util') | |
cheerio = require('cheerio') | |
# Reply booth items title and image_link | |
module.exports = (robot) -> | |
robot.hear /#(https:\/\/\w+.booth.pm\/items\/\d+)/, (msg) -> | |
msg | |
.http(msg.match[1]) | |
.get() (err, res, body) -> | |
if res.statusCode != 200 |
util = require 'util' | |
module.exports = (robot) -> | |
robot.respond /debug( snippet)?/, (msg) -> | |
if msg.match[1]? | |
msg.send '```\n' + util.inspect(msg) + '\n```' | |
else | |
msg.send util.inspect msg | |
Re: http://twitter.com/hondallica/status/436117998823165952
クソコードを見たとき: "Looking at this code is pure agony!"
同僚がバグを直してくれた時: "You are an angel sent to save me!"
before_filter :g_action | |
def g_action | |
g "#{self.class.name}##{action_name}" | |
end |
javascript:(function(){var e=window.open(null,null,"width=480,height=300,menubar=no,toolbar=no,location=no,status=no,resizable=noscrollbars=no"),t=document.createElement("img"),n=[39,53,29,41,14,20],r=function(){var e=Math.ceil(Math.random()*6),s=Math.ceil(Math.random()*n[e-1]);t.setAttribute("src","http://mogashi.no-ip.org/alice/?ep="+e.toString()+"&no="+s.toString());setTimeout(r,1e4)};t.style.margin="0";e.document.body.style.margin="0";e.document.body.style.padding="0";e.document.body.appendChild(t);r()})() |
require 'date' | |
require 'i18n' | |
JAVA = "http://www.java.com/#{I18n.locale}/" | |
YOU = `whoami` | |
def DOWNLOAD(today) | |
puts "Free Java Download" | |
puts JAVA |
class TasuHito | |
constructor: (base) -> | |
@base = base | |
@tashitaAto = null | |
tasu: (number) => | |
result = number + @base | |
console.log result | |
setTimeout => |
HP ProLiant MicroServer http://h50146.www5.hp.com/products/servers/proliant/micro/
CPU model name: AMD Turion(tm) II Neo N40L Dual-Core Processor
CPU MHz: 800.000
Having a buckload of code to authorize users on your application is something you may like or not.
Speaking for myself I hate it. But I still love rails_admin
, here's how you install it without devise. Thanks to phoet for providing the hints in the gist I have forked from.
do NOT add devise
gem "rails_admin", :git => "git://github.com/sferik/rails_admin.git"