Skip to content

Instantly share code, notes, and snippets.

View cmwinters's full-sized avatar

Caleb Winters cmwinters

View GitHub Profile
@cmwinters
cmwinters / gist:83eb930bebc7467eb587
Created July 22, 2014 17:39
Selective Foundation Import
// @import
// "foundation/components/accordion",
// "foundation/components/alert-boxes",
// "foundation/components/block-grid",
// "foundation/components/breadcrumbs",
// "foundation/components/button-groups",
// "foundation/components/buttons",
// "foundation/components/clearing",
// "foundation/components/dropdown",
// "foundation/components/dropdown-buttons",
$btn-bg: #008CBA;
$btn-text-color: white;
.btn {
padding: 10px 20px;
font-weight: bold;
transition: all 300ms ease;
color: rgba($btn-text-color, 0.8);
background: $btn-bg;
.class-1 {
transform: translateX(-100%);
&.modifier {
transform: scale(0.5);
}
}
// `.class-1.modifier` output => `transform: scale(0.5);`
// Desired output => `transform: translateX(-100%) scale(0.5);`

Make current directory available on port 8000

python -m SimpleHTTPServer

<table>
<tr>
<td>Logo will go here</td>
<td>Add another nested table here. I do not like colspans!</td>
</tr>
</table>
@cmwinters
cmwinters / gist:cc867a5be41707953d23
Last active March 7, 2016 09:32
Get a raw Google+ share count in Rails

Google+ Share Count

While there's no officially documented method in the Google+ API way to get a raw share count, there are some tricks you can do to acheive this.

For this example, we're working in a Rails app with Nokogiri. We'll use Nokogiri to open the Google+ fastbutton tool and return the share count.

require 'open-uri'
require 'nokogiri'
@cmwinters
cmwinters / recipes.md
Created April 2, 2019 17:57
Fritatta, biscuits and gravy recipes

Caleb’s Fritatta

  • 4-6 slices bacon
  • 1 onion, diced
  • 1 red bell pepper
  • 2 handfuls spinach
  • 8 eggs
  • 1/2 cup half and half
  • a bunch of shredded cheese
  • salt, pepper, garlic powder to taste
@cmwinters
cmwinters / gist:ecca9475b47d5937abd2
Created August 11, 2014 20:14
Evenly distribute space without flexbox

A lot of times I need to distribute nav-items or something in CSS, but the left and right items need to be flushed left and right and the space between all items needs to be evenly distributed.

Here are a few solutions I've come up with.

1. Use text-align: justify to evenly space items.
// JUSTIFIED LIST
.justified-list {
	margin:0;