- Старые данные Твиттера невозможно или сложно найти: старые ретвиты, упоминания пользователя / хештега / произвольной фразы и т.п.
- Твиты хранятся только в твиттере, а, следовательно, рискуют быть утерянными в случае сбоя/удаления старых данных/удаления пользователя
- Многие люди пользуются твиттером как блогом, публикуя полезную информацию только в твиттер, несмотря на то, что просмотр старых твитов очень неудобен (нет поиска, архива-календаря и т.п.)
This file contains 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
When 'I signup as "$nickname" with email "$email" and password "$password"' do |nickname, email, password| | |
find('.toggle-signup-block').click | |
find('#signup-regular').click | |
find('.cp_signup_nickname input.r').set nickname | |
find('.cp_signup_email input.r').set email | |
find('.cp_signup_password input.tip').click | |
find('.cp_signup_password input.password').set password | |
find('.cp_day .opener').click | |
find('.cp_day li[text()="1"]').click | |
find('.cp_month .opener').click |
This file contains 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
# This snippet adds any and all CSS and JS files in asset directories to list of precompiled assets. | |
# Avoid the dreaded 'whatever.js isn't precompiled' error | |
config.assets.precompile += Dir['app/assets/stylesheets/**/*.css'].map{|f| f.gsub('app/assets/stylesheets/','')} | |
config.assets.precompile += Dir['app/assets/javascripts/**/*.js'].map{|f| f.gsub('app/assets/javascripts/','')} | |
This file contains 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
class MyModel < ActiveRecord::Base | |
def self.one(find_hash={}) | |
results = find(:all, find_hash) | |
if results.size != 1 | |
raise "Expected one record, found #{results.size}" | |
else | |
return results[0] | |
end | |
end | |
end |
This file contains 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
# Connect Opscode repository | |
echo "deb http://apt.opscode.com/ `lsb_release -cs`-0.10 main" | tee /etc/apt/sources.list.d/opscode.list | |
mkdir -p /etc/apt/trusted.gpg.d | |
gpg --keyserver keys.gnupg.net --recv-keys 83EF826A | |
gpg --export packages@opscode.com | tee /etc/apt/trusted.gpg.d/opscode-keyring.gpg > /dev/null | |
# Install chef | |
apt-get update -qq | |
echo "chef chef/chef_server_url string none" | debconf-set-selections && apt-get install chef -y -q | |
# Stop and disable the chef-client service since we're only using chef-solo | |
/etc/init.d/chef-client stop |
Помогите протестировать патч. Срочно. Патч представляет собой бекпорт из Ruby 2.0.0 бага http://bugs.ruby-lang.org/issues/5570 о том, что Ruby неправильно понимает переменные окружения с не-латинским содержимым (грубо говоря), включая и название домашней папки, из-за чего, например, ломается установка гемов.
От вас нужно: виндоус, предпочтительно на виртуалке (за сохранность физической машины ответственности не несу).
-
Скачиваем пропатченный RubyInstaller 1.9.3 https://www.dropbox.com/s/vkx3ia0x1va370l/rubyinstaller-ru.exe
-
Создаем пользователя с русским именем ("Руби", например)
-
Устанавливаем из-под него Ruby
This file contains 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
$ python2.6 test.py | |
(<type 'exceptions.OSError'>, OSError(32, 'Broken pipe'), <traceback object at 0x1096aa950>) | |
Traceback (most recent call last): | |
File "test.py", line 9, in <module> | |
lines=sp.communicate(inp)[0] | |
File "/System/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/subprocess.py", line 691, in communicate | |
return self._communicate(input) | |
File "/System/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/subprocess.py", line 1222, in _communicate | |
bytes_written = os.write(self.stdin.fileno(), chunk) | |
OSError: [Errno 32] Broken pipe |
This file contains 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
; Switch keyboard layouts with Win+Space on Windows | |
#Space::PostMessage, 0x50, 2, 0,, A |
This file contains 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 'net/http' | |
require 'net/https' | |
require 'openssl' | |
require 'uri' | |
def fetch_with_redirect(uri_str, limit = 10) | |
return nil if limit==0 | |
uri = URI.parse(uri_str) | |
http = Net::HTTP.new(uri.host, uri.port) |