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
1) basic lazy image loading should load the real image only when the user scrolls to it | |
Failure/Error: page.source.should have_selector 'img[src*="placekitten"]' | |
expected following output to contain a <img[src*="placekitten"]/> tag: | |
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> | |
<title>Dummy</title> | |
<link href="/assets/application.css" media="all" rel="stylesheet" type="text/css"> | |
<script src="/assets/application.js" type="text/javascript"></script> |
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 'rubygems' | |
require 'fog' | |
SEGMENT_LIMIT = 5368709119.0 # 5GB -1 | |
BUFFER_SIZE = 1024 * 1024 # 1MB | |
CONTAINER = 'my-existing-container' | |
FILE_DIR = '/path/to/my/big/file' | |
FILE_NAME = 'huge_tarball.tgz' | |
RACKSPACE_USERNAME = 'my-rackspace-username' | |
RACKSPACE_API_KEY = 'my-rackspace-api-key' |
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
(* | |
Open a specific Google Hangout in Safari's full-screen mode. | |
See blog post at http://singlebrook.com/blog/google-hangouts-for-remote-worker-telepresence for more, | |
including: | |
- instructions for creating persistent hangouts | |
- keeping machines in the hangout | |
[email protected] | |
*) |
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
cmake_minimum_required(VERSION 2.8) | |
project( picam ) | |
SET(COMPILE_DEFINITIONS -Werror) | |
find_package( OpenCV REQUIRED ) | |
include_directories(/opt/vc/include) | |
include_directories(/opt/vc/include/interface/vcos) | |
include_directories(/opt/vc/include/interface/vcos/pthreads) | |
include_directories(/opt/vc/include/interface/vmcs_host/linux) | |
include_directories(/opt/vc/include/host_applications/linux/libs/bcm_host/include) | |
link_directories(/opt/vc/lib) |
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
# Place all this at the beginning of your spec_helper.rb to avoid sending | |
# incorrect coverage data to Code Climate. | |
require 'codeclimate-test-reporter' | |
SimpleCov.start 'rails' do | |
# We always want to run the HTML coverage formatter. | |
formatters = [ SimpleCov::Formatter::HTMLFormatter ] | |
# Code Climate records the first coverage data it is sent for any single | |
# commit, and then ignores future reports. If you're running a single spec, | |
# this will result in the reporting of erroneously low test coverage. |
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
#!/bin/sh | |
# | |
# msys2-sshd-setup.sh — configure sshd on MSYS2 and run it as a Windows service | |
# | |
# Please report issues and/or improvements to Sam Hocevar <[email protected]> | |
# | |
# Prerequisites: | |
# — MSYS2 itself: http://sourceforge.net/projects/msys2/ | |
# — admin tools: pacman -S openssh cygrunsrv mingw-w64-x86_64-editrights | |
# |
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
<cfscript> | |
theFeed = { | |
version='atom_1.0', | |
entry: [ | |
{ | |
content: { | |
type: 'text/plain', | |
value: 'Some text' | |
} | |
} |
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
<cfset oneRow = QueryNew('baz')> | |
<cfset QueryAddRow(oneRow)> | |
<cfquery name="broken" dbtype="query"> | |
select <cfqueryparam value="1" cfsqltype="cf_sql_integer"> as num, 'a' as letter | |
from oneRow | |
union | |
select <cfqueryparam value="1" cfsqltype="cf_sql_integer"> as num, 'b' as letter | |
from oneRow |
OlderNewer