#Vim ultrahardmode proposal
- a single of hjklweb and so on is allowed
- large motions: e.g. 10k and 10j are allowed
- no insert mode
##Required leaders
map <leader>ei :s/^//<left> (insert into current line line)
map et :s/// (substitute on this line)
class PlingPlangPlong | |
def initialize(number) | |
@number = number | |
end | |
def call | |
has_terms? ? joined_terms : number.to_s | |
end | |
private |
(1579-cleanup)$ bundle exec ruby hi_spec.rb | |
No examples found. | |
Finished in 0.00011 seconds | |
0 examples, 0 failures | |
Randomized with seed 41752 | |
No examples found. |
arena.init = function() { | |
srobo.init(function() { | |
var badCorner = function(cornerDefs) { | |
var buttonsDiv = document.createElement("div"); | |
var showButtons = function(cornerDefs) { | |
srobo.competition.arenas(function(arenas) { | |
if (typeof(arenas) === 'string') { | |
arenas = JSON.parse(arenas); | |
} | |
arenas = arenas.arenas; |
RSpec::Matchers.define :be_a_multiple_of do |expected| | |
match do |actual| | |
expcted = expected + "hi!" | |
RSpec::Matchers::BuiltIn::Equal.new(expected).send(:match, expected, actual) | |
end | |
end |
#Vim ultrahardmode proposal
##Required leaders
map <leader>ei :s/^//<left> (insert into current line line)
map et :s/// (substitute on this line)
describe "doing things" do | |
let(:a) { double(:a) } | |
let(:b) { double(:b) } | |
let(:c) { [a,b] } | |
it "works" do | |
expect(c).to eq([a,b]) | |
end | |
end |
require "faraday" | |
def test_client(app) | |
Faraday.new do |conn| | |
conn.request :url_encoded | |
conn.adapter :rack, app | |
end | |
end |
Going on tour is hard. You've got to find someone to tour with. You've got to pick cities and venues. You've got to book hotels, find places to eat and drink. All of this takes far too much time. | |
This is your Tour automates this process on a per artist basis. By intelligently querying datasets around the internet it's able to save you a bunch of hassle. Get a quick and easy list of all the cities and venues you should visit, as well as the places to go once you're done gigging. | |
import requests | |
from bs4 import BeautifulSoup | |
class YelpRequester: | |
def find_best_thing(self, category, place): | |
root_url = "http://www.yelp.co.uk/search?find_desc=" + category + "&find_loc=" + place + "&ns=1&#sortby=rating" | |
response = requests.get(root_url).text | |
soup = BeautifulSoup(response) | |
best_place = soup.findAll(attrs={"class":"biz-name"})[1] | |
next_url = "http://www.yelp.co.uk/" + best_place.attrs["href"] |
var templated = [ | |
"<div id='" + div_id + "' class='row'>", | |
"<div class='row'>", | |
"<div class='col-md-6 noverflow' style='background:url(" + city_map_url +"); background-size:cover; height: 50vh;'>", | |
"</div>", | |
"<div class='col-md-6 noverflow' style='background:url(" + city_picture_url +"); background-size:cover; height:50vh; padding:0px;'>", | |
"<div class='black-hover-bottom'>" + location_name + "</div>", | |
"</div>", | |
"</div>", | |
"</div>", |