Skip to content

Instantly share code, notes, and snippets.

let mapleader=" "
set number
set relativenumber
set ideajoin
Plug 'easymotion/vim-easymotion'
set easymotion
Plug 'tpope/vim-surround'
set quickscope
Plug 'vim-matchit'
@iamteem
iamteem / docker_gui_apps_linux_mint
Last active September 20, 2016 19:22 — forked from nloadholtes/docker_gui_apps_linux_mint
Getting ubuntu 14/Linux Mint 17 to show GUI apps from Docker
Newer version of Ubuntu (and Linux mint) have .Xauthority and that will interfere with your ability to run X11 apps from a docker container. Here's how you get around that:
docker run -ti -v /tmp/.X11-unix:/tmp/.X11-unix -e DISPLAY --net=host -v $HOME/.Xauthority:/root/.Xauthority <and the rest of your docker string...>
<link rel="import" href="../paper-input/paper-input.html">
<link rel="import" href="../paper-button/paper-button.html">
<link rel="import" href="../core-icons/core-icons.html">
<link rel="import" href="../core-icon/core-icon.html">
<polymer-element name="my-element">
<template>
<style>
:host {
<link rel="import" href="../paper-input/paper-input.html">
<link rel="import" href="../paper-button/paper-button.html">
<polymer-element name="ducking-wookie-signin">
<template>
<style>
:host {
position: absolute;
width: 100%;
should "save birth date" do
assert @person.birth_date == Date.new(1964, 8, 9)
# NOTE: Isn't this equivalent to the assertion above? o_O
# assert_equal Date.new(1964, 8, 9), @person.birth_date
end
a = $('a')
a.find('descendant').doSomething().end().find('another descenadnt').doSomething2()
or
b = $('descendant', $a).doSomething()
class Main < Monk::Glue
set :app_file, __FILE__
use Rack::Session::Cookie,
:key => 'rack.session',
:domain => 'foo.com',
:path => '/',
:expire_after => 2592000,
:secret => 'change_me'
use Rack::Flash
require 'sinatra/base'
require 'pathname'
require Pathname(__FILE__).dirname.expand_path + "models/abstract_user"
module Sinatra
module LilAuthentication
def self.registered(app)
#INVESTIGATE
#the possibility of sinatra having an array of view_paths to load from
#PROBLEM
#!/usr/bin/env ruby -w
require 'benchmark'
n = 1_000_000
l = (1..n).to_a.shuffle
conditions = [
proc { |i| i > 5 },
proc { |i| (i % 2).zero? },
proc { |i| (i % 3).zero? },
describe Item, 'with price_in_dollars of 1500' do
let(:item) { Item.new(:price_in_dollars => 1500) }
it 'should assign 1500_00 to the real price' do
item.price.should == 1500_00
end
end
describe Item, 'with price_in_dollars of FooBar' do
subject { Item.new(:price_in_dollars => 'FooBar') }