Skip to content

Instantly share code, notes, and snippets.

🎯
Focusing

Caleb Winters cmwinters

🎯
Focusing
Block or report user

Report or block cmwinters

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@cmwinters
cmwinters / recipes.md
Created Apr 2, 2019
Fritatta, biscuits and gravy recipes
View recipes.md

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
View gist:c8593024d09606c6531e

Make current directory available on port 8000

python -m SimpleHTTPServer

@cmwinters
cmwinters / gist:cc867a5be41707953d23
Last active Mar 7, 2016
Get a raw Google+ share count in Rails
View gist:cc867a5be41707953d23

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'
View gist:ef7f5a2b080f76fd296a
.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);`
@cmwinters
cmwinters / gist:ecca9475b47d5937abd2
Created Aug 11, 2014
Evenly distribute space without flexbox
View gist:ecca9475b47d5937abd2

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;
View gist:98f8ff2a2a05b16e870c
$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;
@cmwinters
cmwinters / gist:83eb930bebc7467eb587
Created Jul 22, 2014
Selective Foundation Import
View gist:83eb930bebc7467eb587
// @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",
View Typography examples
<h1>h1. heading 1</h1>
<p>Praesent commodo cursus magna, vel scelerisque nisl consectetur et. Aenean eu leo quam. Pellentesque ornare sem lacinia quam venenatis vestibulum. Duis mollis, est non commodo luctus, nisi erat porttitor ligula, eget lacinia odio sem nec elit. Praesent commodo cursus magna, vel scelerisque nisl consectetur.</p>
<h2>h2. heading 2</h2>
<p>Praesent commodo cursus magna, vel scelerisque nisl consectetur et. Aenean eu leo quam. Pellentesque ornare sem lacinia quam venenatis vestibulum. Duis mollis, est non commodo luctus, nisi erat porttitor ligula, eget lacinia odio sem nec elit. Praesent commodo cursus magna, vel scelerisque nisl consectetur.</p>
View Clambake Table Structure
<table>
<tr>
<td>Logo will go here</td>
<td>Add another nested table here. I do not like colspans!</td>
</tr>
</table>
You can’t perform that action at this time.