Skip to content

Instantly share code, notes, and snippets.

@rbarazi
rbarazi / dabblet.css
Created December 16, 2011 18:31
Font Techniques
/* Font Techniques */
body {
background: white;
}
p {
text-align: center;
box-shadow: inset 0px 0px 5px rgba(0,0,0,0.3);
margin: 10px auto;
@rbarazi
rbarazi / application.js
Created August 16, 2011 14:48
Loading issues
var issue = new Pressly.Issue('#issue', {
sectionNavSelector: "nav.links",
jumpToPageAfterLoad: 1,
jumpToPageDelay: 2000,
preloadFonts: [
"FranklinGothic-MediumCond",
"FranklinGothic-DemiCompIta",
"FranklinGothic-DemiComp"
]
});
<!-- include shared libs here... -->
<script src='./javascripts/lib/jquery-1.6.2.min.js' type='text/javascript'></script>
<script src='./javascripts/lib/underscore-min.js' type='text/javascript'></script>
<!-- include source files here... -->
<script src='./javascripts/pressly.js/pressly.core.js' type='text/javascript'></script>
<script src='./javascripts/pressly.js/pressly.mipmap.js' type='text/javascript'></script>
<script src='./javascripts/pressly.js/pressly.gesture.js' type='text/javascript'></script>
<script src='./javascripts/pressly.js/pressly.swipe.js' type='text/javascript'></script>
<script src='./javascripts/pressly.js/pressly.page.js' type='text/javascript'></script>
@rbarazi
rbarazi / css-responsive-images.html
Created August 2, 2011 22:46 — forked from necolas/css-responsive-images.html
Idea for CSS-only responsive images using CSS3 generated content and attr() function. No browser implementation as of May 2011
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>CSS responsive images</title>
<style>
/* Doesn't stop original source image being
downloaded too */
@media (min-device-width:600px) {
@rbarazi
rbarazi / example.html
Created July 28, 2011 19:43 — forked from kylebarrow/example.html
Prevent links in standalone web apps opening Mobile Safari
<!DOCTYPE html>
<head>
<title>Stay Standalone</title>
<meta name="apple-mobile-web-app-capable" content="yes">
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=no">
<script src="stay_standalone.js" type="text/javascript"></script>
</head>
<body>
<ul>
<li><a href="http://google.com/">Remote Link (Google)</a></li>
@rbarazi
rbarazi / mobile tags for your '<head>'
Created July 28, 2011 19:25 — forked from chuanxshi/mobile tags for your '<head>'
mobile tags for your '<head>'
<!doctype html>
<!-- Helpful things to keep in your <head/>
// Shi Chuan, https://github.com/shichuan/mobile-html5-boilerplate
-->
<head>
<!-- consider using below meta tags if you want to disable format detection by default -->
<meta name="format-detection" content="telephone=no"/>
<meta name="format-detection" content="address=no"/>
<!-- consider using below link tag if the page is duplicate content of a desktop version -->
@rbarazi
rbarazi / console.rb
Created July 19, 2011 19:31
Console script for a stand alone gem/app
require 'bundler'
Bundler.require
# Require your gem/lib
# require 'mygem'
require 'irb'
task :console do
# Connect and load the db
@rbarazi
rbarazi / Rakefile
Created July 19, 2011 18:19
Rakefile example
require 'rubygems'
require 'bundler'
require 'rake'
require 'rspec/core/rake_task'
Bundler.setup
RSpec::Core::RakeTask.new(:spec) do |t|
# t.rspec_opts = ["-c", "-f progress", "-r ./spec/spec_helper.rb"]
t.pattern = 'spec/**/*_spec.rb'
end
@rbarazi
rbarazi / with_dot_notation.rb
Created June 10, 2010 16:43
Hash with dot notations
class HashWithDotNotation < Hash
def initialize(constructor = {})
if constructor.is_a?(Hash)
super()
self.replace(constructor)
else
super(constructor)
end
end
# bundle_path "vendor/bundler_gems" #Will be vendor/gems in RAILS 3
#disable_system_gems
source :gemcutter
gem "rails", "2.3.5"
gem 'mysql'
gem "compass", "0.8.17"
gem "haml", "2.2.10"
gem "will_paginate", "2.3.11"
gem "aws-s3", "0.6.2", :require => "aws/s3"