Skip to content

Instantly share code, notes, and snippets.

@TimPetricola
TimPetricola / cssstats.html
Created Sep 27, 2017
Drivy CSS stats 2017/09/27
View cssstats.html
<html><head>
<meta charset="utf-8">
<title>CSS Stats</title>
<meta name="description" content="">
<meta name="viewport" content="width=device-width,initial-scale=1">
<style>body,button{margin:0}button,input,select{font-family:inherit;font-size:100%}svg{max-height:100%}body{font-family:'-apple-system',BlinkMacSystemFont,'Helvetica Neue',Helvetica,sans-serif;line-height:1.5;font-size:100%}h1,h2{font-family:'-apple-system',BlinkMacSystemFont,'Helvetica Neue',Helvetica,sans-serif;font-weight:700;line-height:1.25;margin-top:1em;margin-bottom:.5em}p,ul{font-size:1rem;margin-top:0;margin-bottom:1rem}ul{padding-left:2rem}pre{font-family:'Source Code Pro',Consolas,monospace;font-size:inherit;margin-top:0;margin-bottom:1rem;overflow-x:scroll}h1{font-size:2rem}.h2,h2{font-size:1.5rem}.h3{font-size:1.25rem}.h4{font-size:1rem}.h5{font-size:.875rem}.h6{font-size:.75rem}.list-reset{list-style:none;padding-left:0}input,select{margin-top:0;margin-bottom:.5rem}input[type=url]{box-sizing:border-box;height:2.25em;paddi
@TimPetricola
TimPetricola / cracklepop.go
Created Mar 16, 2014
A simple CracklePop (FizzBuzz) program in Go
View cracklepop.go
package main
import (
"fmt"
"strconv"
)
const crackle, pop = "Crackle", "Pop"
func CracklePop(i int) (res string) {
@TimPetricola
TimPetricola / image.rb
Created Dec 10, 2013
Carrierwave + S3 image processing
View image.rb
# Image model with ImageUploader mounted on image attribute
class Image < ActiveRecord::Base
mount_uploader :image, ImageUploader
def process_image!(versions = [])
return unless self.image.file.exists?
hosted_image.should_process = true
@TimPetricola
TimPetricola / .rdebugrc
Created Apr 8, 2013
ruby debugger config
View .rdebugrc
set autolist
set autoeval
set autoreload
@TimPetricola
TimPetricola / 1-mixins.sass
Last active Dec 14, 2015
Keyframes mixin for SASS
View 1-mixins.sass
=keyframes($name)
@-webkit-keyframes #{$name}
@content
@-moz-keyframes #{$name}
@content
@-ms-keyframes #{$name}
@content
@keyframes #{$name}
@content
You can’t perform that action at this time.