Skip to content

Instantly share code, notes, and snippets.

View ptb's full-sized avatar

Peter T Bosse II ptb

  • 14:57 (UTC -04:00)
View GitHub Profile
@ptb
ptb / ptb.txt
Last active August 28, 2015 13:53
Test.
@ptb
ptb / index.html
Last active August 29, 2015 13:56
<!DOCTYPE html>
<html>
<head>
<meta charset='UTF-8'/>
<title></title>
</head>
<body>
<div id='main'></div>
<script data-main='js/main.js' src='js/require.js'></script>
</body>
=slide-horizontal
.slideleft, .slideright
-webkit-animation-timing-function: ease-in-out
.slideleft
&.in
-webkit-animation-name: slideLeftIn
&.out
-webkit-animation-name: slideLeftOut
CA_COLOR_OPAQUE=1 /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/Applications/iPhone\ Simulator.app/Contents/MacOS/iPhone\ Simulator
@ptb
ptb / reference.html
Created March 26, 2014 12:50
CSS Reference and Sort Order
<!DOCTYPE html>
<html lang='en' xmlns='http://www.w3.org/1999/xhtml'>
<head>
<meta charset='utf-8'>
<title>CSS Reference and Sort Order</title>
<style>
body {
counter-reset: linenumbers;
margin-left: 2em; }
@ptb
ptb / features.txt
Created March 29, 2014 11:21
Supported browser features
box-sizing supported by: <bit.ly/HM42F3>
Chrome, IE 8+, Firefox (-moz), Safari 5.1+, Opera
iOS <= 4 & Android <= 2.3 (-webkit), Firefox (-moz)
:before and :after pseudo-elements supported by:
Chrome, IE 8+, Firefox, Safari, Opera 4.0+:
::before and ::after pseudo-elements supported by:
Chrome, IE 9+, Firefox, Safari, Opera 7.0+:
<mzl.la/Q5hf09> <bit.ly/YCpGPd> <bit.ly/XV046x>
<!DOCTYPE html>
<html class='no-js' lang='en' xml:lang='en' xmlns='http://www.w3.org/1999/xhtml'>
<head>
<meta charset='UTF-8' />
<title>April 2014</title>
<meta content='initial-scale=1, width=device-width' name='viewport' />
<style type='text/css'>
*, *::before, *::after {
box-sizing: border-box;
}
@ptb
ptb / application_controller.rb
Created April 9, 2014 14:43
Rails 4.1 Action Pack Variants for iOS and Android
class ApplicationController < ActionController::Base
before_action :detect_device_type
private
def detect_device_type
case request.user_agent
when /ip(hone|od)/i
request.variant = :ipod
when /android.+mobile/i
@ptb
ptb / respimg.rb
Created May 20, 2014 14:38
Command-line image resizer for Bootstrap grid
#!/usr/bin/env ruby
require 'pathname'
require 'optparse'
require 'ostruct'
require 'rmagick'
class RespImgs
CONTAINER_WIDTH = { xs: 320, sm: 750, md: 970, lg: 1170 }
NUM_COLUMNS = 12
@ptb
ptb / commit.sh
Last active August 29, 2015 14:01
Commit All File Changes to Git Repository, Automatically
#!/bin/sh
/usr/bin/find . -type d -empty -exec touch {}/.keep \;
/usr/local/bin/git add --all /Users/ptb/Copy/; /usr/local/bin/git commit --message='' --allow-empty-message