Skip to content

Instantly share code, notes, and snippets.

View bergantine's full-sized avatar

Bergantine bergantine

View GitHub Profile
@bergantine
bergantine / gist:5243223
Last active September 27, 2018 03:04
CSS grayscale filter (go from grayscale to full color on hover) #css #sethneilson
img:hover {
-webkit-filter: grayscale(0%);
-webkit-transition: .5s ease-in-out;
-moz-filter: grayscale(0%);
-moz-transition: .5s ease-in-out;
-o-filter: grayscale(0%);
-o-transition: .5s ease-in-out;
}
img {
@bergantine
bergantine / gist:5302604
Last active December 15, 2015 18:19
Vagrantfile for PHP-Newproj #vagrant #php #apache #vagrantfile
# -*- mode: ruby -*-
# vi: set ft=ruby :
Vagrant::Config.run do |config|
config.vm.define :lampvm do |cfg|
# Every Vagrant virtual environment requires a box to build off of.
cfg.vm.box = "precise64"
# The url from where the 'config.vm.box' box will be fetched if it
# doesn't already exist on the user's system.
@bergantine
bergantine / gist:5521525
Last active December 17, 2015 00:29
Vagrantfile for Flask-Newproj #vagrant #flask #python #vagrantfile
# -*- mode: ruby -*-
# vi: set ft=ruby :
Vagrant::Config.run do |config|
config.vm.define :djangovm do |cfg|
# Every Vagrant virtual environment requires a box to build off of.
# The precise64_vagrant122 box is built for vagrant 1.2.2
cfg.vm.box = "precise64_vagrant122"
# The url from where the 'config.vm.box' box will be fetched if it
<div class="container">
<ul>
<li id="pink">Pink</li>
<li id="salmon">Salmon</li>
<li id="blue">Blue</li>
<li id="green">Green</li>
<li id="red">Red</li>
</ul>
</div>
@bergantine
bergantine / prompt.sh
Last active December 27, 2015 17:39 — forked from roychri/prompt.sh
# Configure colors, if available.
if [ -x /usr/bin/tput ] && tput setaf 1 >&/dev/null; then
c_reset='\[\e[0m\]'
c_user='\[\e[0;32m\]'
c_path='\[\e[1;34m\]'
c_git_clean='\[\e[0;37m\]'
c_git_staged='\[\e[0;32m\]'
c_git_unstaged='\[\e[0;31m\]'
else
c_reset=
@bergantine
bergantine / gist:8142407
Last active April 14, 2018 20:44
Fluid-width (responsive) Vimeo and YouTube videos. Adapted from CSS Tricks. http://css-tricks.com/NetMag/FluidWidthVideo/Article-FluidWidthVideo.php
// Find all YouTube videos
var $allVideos = $("iframe[src^='//player.vimeo.com'], iframe[src^='http://www.youtube.com']");
// The element that is fluid width
var $fluidEl = $("body");
// Figure out and save aspect ratio for each video
$allVideos.each(function() {
$(this)
@bergantine
bergantine / gist:8233006
Created January 3, 2014 04:59
Fix iPhone (iOS) Safari viewport scaling bug when rotating between landscape and portrait (from http://webdesignerwall.com/tutorials/iphone-safari-viewport-scaling-bug)
<script type="text/javascript">
(function(doc) {
var addEvent = 'addEventListener',
type = 'gesturestart',
qsa = 'querySelectorAll',
scales = [1, 1],
meta = qsa in doc ? doc[qsa]('meta[name=viewport]') : [];
function fix() {
@bergantine
bergantine / Readme.md
Last active August 29, 2015 13:55
Vagrant config for a new Ruby on Rails project
@bergantine
bergantine / Vagrantfile
Last active August 30, 2022 19:31
Vagrant config for basic Python development
# -*- mode: ruby -*-
# vi: set ft=ruby :
VAGRANTFILE_API_VERSION = "2"
Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
config.vm.box = "precise64"
# The url from where the 'config.vm.box' box will be fetched if it
# doesn't already exist on the user's system.
@bergantine
bergantine / Vagrantfile
Last active July 13, 2022 04:15
Vagrant box for Zurb development.
# -*- mode: ruby -*-
# vi: set ft=ruby :
VAGRANTFILE_API_VERSION = "2"
Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
config.vm.box = "precise64-2"
# The url from where the 'config.vm.box' box will be fetched if it