Blogging with octopress:
- new post: bundle exec rake new_post["title"]
- write stuff
- bundle exec rake preview
- git add .
- git commit -m 'add awesome post'
- git push origin source
- bundle exec rake generate
- bundle exec rake deploy
| =Navigating= | |
| visit('/projects') | |
| visit(post_comments_path(post)) | |
| =Clicking links and buttons= | |
| click_link('id-of-link') | |
| click_link('Link Text') | |
| click_button('Save') | |
| click('Link Text') # Click either a link or a button | |
| click('Button Value') |
| #! /usr/bin/python | |
| # coding: utf-8 | |
| import codecs | |
| import re | |
| from string import punctuation | |
| import collections | |
| import sys | |
| punctuation_regexp = re.compile(r'[\s{}]+'.format(re.escape(punctuation))) |
| // SHA Hash presence web server. | |
| // | |
| // Requires a file containing sorted sha1s in binary form (20 bytes each). | |
| package main | |
| import ( | |
| "encoding/hex" | |
| "fmt" | |
| "io/ioutil" |
Blogging with octopress:
| # Based on https://gist.github.com/74107 by # Copyright (C) 2009 Torsten Becker <[email protected]> | |
| # | |
| # Rewrited by gazay | |
| require 'socket' | |
| require 'uri' | |
| class Proxy | |
| attr_accessor :socket |
| require 'active_record' | |
| require 'pg' | |
| require 'roo' | |
| ActiveRecord::Base.establish_connection( | |
| :adapter => 'postgresql', | |
| :host => 'localhost', | |
| :username => 'kevin', | |
| :database => 'tinkov_dev', | |
| :password => '123' |
| # encoding: UTF-8 | |
| require 'singleton' | |
| class Cats | |
| include Singleton | |
| def initialize | |
| @cat = { name: 'Alice', sex: 'F' } | |
| end |
| common: &common | |
| encoding: unicode | |
| adapter: postgresql | |
| username: #{user_name} | |
| password: #{password} | |
| host: localhost | |
| development: | |
| <<: *common | |
| database: db_dev |