I hereby claim:
- I am seven1m on github.
- I am seven1m (https://keybase.io/seven1m) on keybase.
- I have a public key whose fingerprint is B446 F96D 0CB5 3366 4D8C 992D 4386 DC2D 12ED 223E
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
#!/usr/bin/env ruby | |
STORE="#{ENV['HOME']}/.clipboard-history" | |
LIMIT=100 | |
require 'timeout' | |
unless File.exist?(STORE) | |
File.open(STORE, 'w') { |f| f.write('') } | |
end |
require 'curses' | |
include Curses | |
class Editor | |
LOG = File.open('editor.log', 'w') | |
def initialize | |
@x = 1 | |
@y = 1 | |
end |
require 'httparty' | |
require 'ostruct' | |
class Issue < OpenStruct | |
include HTTParty | |
base_uri 'https://vitals.atlassian.net/rest/api/2' | |
USER = 'JIRA_USER' | |
PASS = 'JIRA_PASSWORD' | |
PROJECT = 'Consumer Websites' |
LINUX = RUBY_PLATFORM =~ /linux/i unless defined?(LINUX) | |
def escape(arg) | |
arg.gsub(/\e\[..m?/, '') # rid us of ansi escape sequences | |
.gsub(/["`]/, "'") | |
.gsub(/\r?\n/, "\\\\\\\\\\n") | |
end | |
def notify(pass, heading, body='') | |
cmd = if LINUX |
# -*- coding: iso-8859-1 -*- | |
# The code here is based loosely on John Cardinal's notes found at: | |
# http://www.johncardinal.com/tmgutil/capitalizenames.htm | |
# 2006-03-16 | |
# Thanks to David Kern <kernd@reasonspace.com> for fixing some bugs. | |
suffixes = "II|(II)|III|(III)|IV|(IV)|VI|(VI)|VII|(VII)|2nd|(2nd)|3rd|(3rd)|4th|(4th)|5th|(5th)".split('|') |
require 'open-uri' | |
URL = /https?:\/\/getfile\d*\.posterous\.com[^"]*/ | |
posts = Dir['source/_posts/*'].to_a | |
posts.each do |path| | |
post = File.read(path) | |
post.gsub!(URL).each do |url| | |
data = open(url).read | |
name = File.split(url).last |
class Foo | |
class << self | |
private | |
def bar | |
puts 'I did not broke your ruby' | |
end | |
end | |
end | |
Foo.bar # NoMethodError: private method `bar' called for Foo:Class |