Skip to content

Instantly share code, notes, and snippets.

Chris Manning cwmanning

Block or report user

Report or block cwmanning

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
@cwmanning
cwmanning / SassMeister-input-HTML.html
Created Jan 22, 2015
Generated by SassMeister.com.
View SassMeister-input-HTML.html
<h1>Viget</h1>
<ul>
<li>
<a href="http://viget.com/about#team" class="flyout-nav">Team</a>
<ul class="flyout">
<li>
<a href="http://viget.com/about/team/bwilliams">Brian W. Williams</a>
</li>
<li>
<a href="http://viget.com/about/team/arankin">Andy Rankin</a>
@cwmanning
cwmanning / SassMeister-input.scss
Created Oct 15, 2014
Generated by SassMeister.com.
View SassMeister-input.scss
// ----
// Sass (v3.3.14)
// Compass (v1.0.1)
// ----
$colors: (
birthday: #0989cb,
gender: #8666ae,
weight: #02bba7,
height: #ff8178
@cwmanning
cwmanning / SassMeister-input.sass
Created Jul 9, 2014
Generated by SassMeister.com.
View SassMeister-input.sass
// ----
// Sass (v3.3.9)
// Compass (v1.0.0.alpha.20)
// ----
=calcIt($property, $fallback, $expression)
#{$property}: $fallback
#{$property}: calc(#{$expression})
body
View _vertical_center.sass
=vertically-centered-child($size: $base-font-size)
font-size: 0
&:before
content: ''
display: inline-block
height: 100%
vertical-align: middle
> *
@cwmanning
cwmanning / SassMeister-input.scss
Created Jan 23, 2014
Generated by SassMeister.com.
View SassMeister-input.scss
// ----
// Sass (v3.3.0.rc.2)
// Compass (v1.0.0.alpha.17)
// ----
$beige: #ece9d9;
p {
color: $beige - 25;
}
@cwmanning
cwmanning / slideshow.css
Last active Dec 20, 2015
Flexible, 4:3 container with images that fill. Images 'letter box' if not 4:3
View slideshow.css
.slide-media {
background: #000;
text-align: center;
width: 100%;
// Intrisic Ratios. Used here to produce a flexible 4:3 box
// http://alistapart.com/article/creating-intrinsic-ratios-for-video
height: 0;
padding-bottom: 75%;
position: relative;
@cwmanning
cwmanning / blah.js
Created May 14, 2013
touch support stash
View blah.js
this.$slide
.on('touchstart', function(e) {
e.preventDefault();
})
.on('touchend', function(e) {
console.log(e)
var slide = $(e.currentTarget);
var touchEvent = e.originalEvent || e;
var targetX = e.target.x;
console.log(e.target.x);
@cwmanning
cwmanning / sample.py
Created Apr 25, 2013
parse Git log info
View sample.py
from sh import git
#
# Command Being Run
# git --git-dir autodeploy_branchbuilder.git log --grep="Merge pull request #" release/2.0.. | grep "Merge pull request"
#
# Output Expected Sample
# Merge pull request #19 from GannettDigital/feature/update_conflicts
# Merge pull request #18 from GannettDigital/feature/bugsquash
# etc.
View sports-models.py
def _scores(self, scores):
if not hasattr(scores, 'team_game_stats') or not hasattr(scores.team_game_stats, 'sub_score'):
return []
widget_scores = []
for score in scores.team_game_stats.sub_score:
try:
widget_scores.append(score.period_score)
except AttributeError:
widget_scores.append(0)
label = self.caption.get(self.league_key, self.caption['default'])
View job-search.js
StateManager.fetchHtml('/services/money/jobs/categories/', { timeout: 10000 }).done(_.bind(function(html){
this.$('.jobs-form-dropdown').append(html);
}, this))
.always(function(){
this.subviews.jobSearchForm = new SelectDropdown({
el: this.$('.jobs-form-dropdown')
});
});
You can’t perform that action at this time.